次の方法で共有


IFileEntityAsyncEnumerator.IsInEnumerationAsync Method

Definition

Gets a value that indicates whether the given entity exists in the current enumeration.

public System.Threading.Tasks.Task<bool> IsInEnumerationAsync (Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.FileEntity entity, System.Threading.CancellationToken cancellationToken = default);
abstract member IsInEnumerationAsync : Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.FileEntity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function IsInEnumerationAsync (entity As FileEntity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

entity
FileEntity

The entry to verify.

cancellationToken
CancellationToken

(optional) Cancellation token to cancel the task.

Returns

A task that represents the asynchronous operation.

Remarks

This method returns True even if the given item has already been returned by MoveNextAsync(CancellationToken) and won't be return again until Reset() is called. It will return False when IsValid is False.

Applies to