WorkspacesExtensibility.QueryProjectByGuidAsync<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Performs an asynchronous query on project with a specific project guid.
public System.Threading.Tasks.Task<Microsoft.VisualStudio.ProjectSystem.Query.IQueryResults<T>> QueryProjectByGuidAsync<T> (Func<Microsoft.VisualStudio.ProjectSystem.Query.IAsyncQueryable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot>,Microsoft.VisualStudio.ProjectSystem.Query.IAsyncQueryable<T>> queryFunc, Guid projectGuid, System.Threading.CancellationToken cancellationToken);
member this.QueryProjectByGuidAsync : Func<Microsoft.VisualStudio.ProjectSystem.Query.IAsyncQueryable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot>, Microsoft.VisualStudio.ProjectSystem.Query.IAsyncQueryable<'T>> * Guid * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.ProjectSystem.Query.IQueryResults<'T>>
Public Function QueryProjectByGuidAsync(Of T) (queryFunc As Func(Of IAsyncQueryable(Of IProjectSnapshot), IAsyncQueryable(Of T)), projectGuid As Guid, cancellationToken As CancellationToken) As Task(Of IQueryResults(Of T))
Type Parameters
- T
Type of the object being queried.
Parameters
- queryFunc
- Func<IAsyncQueryable<IProjectSnapshot>,IAsyncQueryable<T>>
Function to prepare query.
- projectGuid
- Guid
The project guid.
- cancellationToken
- CancellationToken
Cancellation token to monitor.
Returns
Task<IQueryResults<T>>
Results of the project query.
Exceptions
Thrown when query execution is failed.