Partager via


WorkspacesExtensibility.UpdateProjectsAsync<TUpdatable,TResult> Method

Definition

Performs an asynchronous update on projects hierarchy.

public System.Threading.Tasks.Task<Microsoft.VisualStudio.ProjectSystem.Query.IQueryResults<TResult>> UpdateProjectsAsync<TUpdatable,TResult> (Func<Microsoft.VisualStudio.ProjectSystem.Query.IAsyncQueryable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot>,Microsoft.VisualStudio.ProjectSystem.Query.IAsyncQueryable<TUpdatable>> queryFunc, Func<Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<TUpdatable>,Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<TResult>> updateFunc, System.Threading.CancellationToken cancellationToken) where TUpdatable : Microsoft.VisualStudio.ProjectSystem.Query.IEntity;
member this.UpdateProjectsAsync : Func<Microsoft.VisualStudio.ProjectSystem.Query.IAsyncQueryable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot>, Microsoft.VisualStudio.ProjectSystem.Query.IAsyncQueryable<'Updatable>> * Func<Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<'Updatable>, Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<'Result>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.ProjectSystem.Query.IQueryResults<'Result>> (requires 'Updatable :> Microsoft.VisualStudio.ProjectSystem.Query.IEntity)
Public Function UpdateProjectsAsync(Of TUpdatable As IEntity, TResult As IEntity) (queryFunc As Func(Of IAsyncQueryable(Of IProjectSnapshot), IAsyncQueryable(Of TUpdatable)), updateFunc As Func(Of IAsyncUpdatable(Of TUpdatable), IAsyncUpdatable(Of TResult)), cancellationToken As CancellationToken) As Task(Of IQueryResults(Of TResult))

Type Parameters

TUpdatable

Type of the object being returned as a result of the query selector.

TResult

Type of the object being returned as a result of the update actions.

Parameters

queryFunc
Func<IAsyncQueryable<IProjectSnapshot>,IAsyncQueryable<TUpdatable>>

Function to select items to update.

updateFunc
Func<IAsyncUpdatable<TUpdatable>,IAsyncUpdatable<TResult>>

Function to update selected items.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

Task<IQueryResults<TResult>>

Results of the solution update actions.

Exceptions

Thrown when query execution is failed.

Applies to