IExtensionMetadataService.SubscribeForMetadataEventsAsync Method

Definition

Overloads

SubscribeForMetadataEventsAsync(String, CancellationToken)

Requests that the MetadataChanged event be raised for changes that impact the section with the specified name. If this is the first subscription, it will also raise an event with the current set of metadata.

SubscribeForMetadataEventsAsync(IEnumerable<String>, IObserver<ExtensionMetadata>, CancellationToken)

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.

SubscribeForMetadataEventsAsync(String, CancellationToken)

Requests that the MetadataChanged event be raised for changes that impact the section with the specified name. If this is the first subscription, it will also raise an event with the current set of metadata.

public:
 System::Threading::Tasks::Task ^ SubscribeForMetadataEventsAsync(System::String ^ sectionName, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task SubscribeForMetadataEventsAsync (string sectionName, System.Threading.CancellationToken cancellationToken);
abstract member SubscribeForMetadataEventsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SubscribeForMetadataEventsAsync (sectionName As String, cancellationToken As CancellationToken) As Task

Parameters

sectionName
String

Name of the metadata section.

cancellationToken
CancellationToken

A cancellation token to cancel the in-progress invocation.

Returns

A Task representing the asynchronous operation.

Applies to

SubscribeForMetadataEventsAsync(IEnumerable<String>, IObserver<ExtensionMetadata>, CancellationToken)

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<System::String ^> ^ sectionNames, IObserver<Microsoft::VisualStudio::RpcContracts::Extensibility::ExtensionMetadata ^> ^ observer, System::Threading::CancellationToken cancellationToken);
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>
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.

Applies to