Sdílet prostřednictvím


ISolutionService.SubscribeToOpenCodeContainersStateAsync Method

Definition

Attaches an observer for updates to open code containers state.

public:
 System::Threading::Tasks::Task<IDisposable ^> ^ SubscribeToOpenCodeContainersStateAsync(IObserver<Microsoft::VisualStudio::RpcContracts::Solution::OpenCodeContainersState ^> ^ observer, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<IDisposable> SubscribeToOpenCodeContainersStateAsync (IObserver<Microsoft.VisualStudio.RpcContracts.Solution.OpenCodeContainersState> observer, System.Threading.CancellationToken cancellationToken);
abstract member SubscribeToOpenCodeContainersStateAsync : IObserver<Microsoft.VisualStudio.RpcContracts.Solution.OpenCodeContainersState> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
Public Function SubscribeToOpenCodeContainersStateAsync (observer As IObserver(Of OpenCodeContainersState), cancellationToken As CancellationToken) As Task(Of IDisposable)

Parameters

observer
IObserver<OpenCodeContainersState>

An observer of open code containers state.

cancellationToken
CancellationToken

A cancellation token.

Returns

A value that may be disposed of to unregister the observer from future notifications.

Remarks

The initial state of open code containers will be sent immediately to the observer.

This method was added in Visual Studio 16.9.

Applies to