Udostępnij za pośrednictwem


ObservableSettingsListBase<TValue>.SubscribeAsync Method

Definition

Allows targetBlock to receive updates of the list of items stored on the list and receive up-to-date versions of it whenever it gets modified.

public virtual System.Threading.Tasks.Task<IDisposable> SubscribeAsync (System.Threading.Tasks.Dataflow.ITargetBlock<Microsoft.VisualStudio.Shell.StatefulReadOnlyList<ValueT,object>> targetBlock, System.Threading.CancellationToken cancellationToken = default);
abstract member SubscribeAsync : System.Threading.Tasks.Dataflow.ITargetBlock<Microsoft.VisualStudio.Shell.StatefulReadOnlyList<'ValueT, obj>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
override this.SubscribeAsync : System.Threading.Tasks.Dataflow.ITargetBlock<Microsoft.VisualStudio.Shell.StatefulReadOnlyList<'ValueT, obj>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
Public Overridable Function SubscribeAsync (targetBlock As ITargetBlock(Of StatefulReadOnlyList(Of ValueT, Object)), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDisposable)

Parameters

cancellationToken
CancellationToken

Returns

Applies to