Condividi tramite


IToolWindowProvider.SubscribeAsync Method

Definition

Attaches an observer that receives updates about tool window property changes.

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

Parameters

observer
IObserver<ToolWindowPropertyChangedArgs>

The tool window property change observer.

cancellationToken
CancellationToken

A CancellationToken to cancel the in-progress request.

Returns

An IDisposable object that can be disposed to unsubscribe the observer.

Applies to