Partilhar via


VsExtensionMetadataService.SubscribeForMetadataEventsAsync Method

Definition

Attaches an observer for updates to sections with the specified names. If this is the first subscription, it will notify the observer with the current set of metadata.

public System.Threading.Tasks.Task<IDisposable> SubscribeForMetadataEventsAsync (System.Collections.Generic.IEnumerable<string> sectionNames, IObserver<Microsoft.VisualStudio.RpcContracts.Extensibility.ExtensionMetadata> observer, System.Threading.CancellationToken cancellationToken);
abstract member SubscribeForMetadataEventsAsync : seq<string> * IObserver<Microsoft.VisualStudio.RpcContracts.Extensibility.ExtensionMetadata> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
override this.SubscribeForMetadataEventsAsync : seq<string> * IObserver<Microsoft.VisualStudio.RpcContracts.Extensibility.ExtensionMetadata> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
Public Function SubscribeForMetadataEventsAsync (sectionNames As IEnumerable(Of String), observer As IObserver(Of ExtensionMetadata), cancellationToken As CancellationToken) As Task(Of IDisposable)

Parameters

sectionNames
IEnumerable<String>

The names of the sections that the observer is interested in being notified of.

observer
IObserver<ExtensionMetadata>

An observer of extension metadata changes.

cancellationToken
CancellationToken

A cancellation token to cancel the in-progress invocation.

Returns

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

Implements

Applies to