共用方式為


IInternalExtensionMetadataService.SubscribeAsync 方法

定義

訂閱區段清單的元數據變更。

public System.Threading.Tasks.Task<IDisposable> SubscribeAsync (System.Collections.Generic.IReadOnlyList<string> sectionNames, Microsoft.Internal.VisualStudio.Extensibility.Framework.IExtensionMetadataObserver observer, System.Collections.Generic.IReadOnlyList<string> dependentSections, System.Threading.CancellationToken cancellationToken);
abstract member SubscribeAsync : System.Collections.Generic.IReadOnlyList<string> * Microsoft.Internal.VisualStudio.Extensibility.Framework.IExtensionMetadataObserver * System.Collections.Generic.IReadOnlyList<string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
Public Function SubscribeAsync (sectionNames As IReadOnlyList(Of String), observer As IExtensionMetadataObserver, dependentSections As IReadOnlyList(Of String), cancellationToken As CancellationToken) As Task(Of IDisposable)

參數

sectionNames
IReadOnlyList<String>

要求更新通知的元數據區段。

observer
IExtensionMetadataObserver

觀察者實例。

dependentSections
IReadOnlyList<String>

此觀察者應該等候的區段清單。

cancellationToken
CancellationToken

要監視的取消令牌。

傳回

可處置的物件,用來管理訂閱的存留期。

適用於