Partager via


CodeContainerStorageManager.SubscribeAsync Method

Definition

Allows targetBlock to receive updates about Code Containers accessed by the Shell.

public System.Threading.Tasks.Task<IDisposable> SubscribeAsync (System.Threading.Tasks.Dataflow.ITargetBlock<Microsoft.VisualStudio.Shell.StatefulReadOnlyList<Microsoft.VisualStudio.Shell.CodeContainerManagement.CodeContainer,int?>> targetBlock, System.Threading.CancellationToken cancellationToken = default);
abstract member SubscribeAsync : System.Threading.Tasks.Dataflow.ITargetBlock<Microsoft.VisualStudio.Shell.StatefulReadOnlyList<Microsoft.VisualStudio.Shell.CodeContainerManagement.CodeContainer, Nullable<int>>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
override this.SubscribeAsync : System.Threading.Tasks.Dataflow.ITargetBlock<Microsoft.VisualStudio.Shell.StatefulReadOnlyList<Microsoft.VisualStudio.Shell.CodeContainerManagement.CodeContainer, Nullable<int>>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
Public Function SubscribeAsync (targetBlock As ITargetBlock(Of StatefulReadOnlyList(Of CodeContainer, Nullable(Of Integer))), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDisposable)

Parameters

targetBlock
ITargetBlock<StatefulReadOnlyList<CodeContainer,Nullable<Int32>>>

The target block to which updates will be sent.

cancellationToken
CancellationToken

Cancellation token

Returns

An IDisposable that unsubscribes targetBlock upon disposal.

Implements

Exceptions

Thrown if targetBlock is null.

Applies to