Partager via


ISolutionFileEnumeratorFactory.FindMatchingFileNamesAsync Method

Definition

Gets a list of all files with file names matching the given query.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.FileEntity>> FindMatchingFileNamesAsync (string query, bool includeMiscellaneousProject, bool includeHiddenItems, bool includeExternalItems, bool includePrefixMatches = true, bool waitForValidCache = true, System.Threading.CancellationToken cancellationToken = default);
abstract member FindMatchingFileNamesAsync : string * bool * bool * bool * bool * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.FileEntity>>
Public Function FindMatchingFileNamesAsync (query As String, includeMiscellaneousProject As Boolean, includeHiddenItems As Boolean, includeExternalItems As Boolean, Optional includePrefixMatches As Boolean = true, Optional waitForValidCache As Boolean = true, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of FileEntity))

Parameters

query
String

The search query to match.

includeMiscellaneousProject
Boolean

Defines whether the miscellaneous project must be included.

includeHiddenItems
Boolean

Defines whether the hidden items must be included.

includeExternalItems
Boolean

Defines whether the external items must be included.

includePrefixMatches
Boolean

Indicates that search should include non-exact matches.

waitForValidCache
Boolean

Indicates that search should wait for a valid cache instead of using what is already cached.

cancellationToken
CancellationToken

Cancels the pending search.

Returns

Remarks

As opposed to using methods with PathFilter parameters, this method performs a non-linear, binary search, looking just at file names.

Applies to