共用方式為


IVsAsyncFileChangeEx2.AdviseFileChangesAsync 方法

定義

建立多個檔案變更的訂用帳戶。

public System.Threading.Tasks.Task<uint[]> AdviseFileChangesAsync (System.Collections.Generic.IReadOnlyCollection<string> filenames, Microsoft.VisualStudio.Shell.Interop._VSFILECHANGEFLAGS filter, Microsoft.VisualStudio.Shell.Interop.IVsFreeThreadedFileChangeEvents2 sink, System.Threading.CancellationToken cancellationToken);
abstract member AdviseFileChangesAsync : System.Collections.Generic.IReadOnlyCollection<string> * Microsoft.VisualStudio.Shell.Interop._VSFILECHANGEFLAGS * Microsoft.VisualStudio.Shell.Interop.IVsFreeThreadedFileChangeEvents2 * System.Threading.CancellationToken -> System.Threading.Tasks.Task<uint32[]>
Public Function AdviseFileChangesAsync (filenames As IReadOnlyCollection(Of String), filter As _VSFILECHANGEFLAGS, sink As IVsFreeThreadedFileChangeEvents2, cancellationToken As CancellationToken) As Task(Of UInteger())

參數

filenames
IReadOnlyCollection<String>

要訂閱的檔名。

filter
_VSFILECHANGEFLAGS

描述要通知之變更的旗標。

sink
IVsFreeThreadedFileChangeEvents2

事件接收。

cancellationToken
CancellationToken

取消語彙基元。

傳回

一旦設定訂用帳戶,就會完成的工作。 工作的結果會是訂用帳戶 Cookie。 傳回陣列中的第一個 Cookie 是 中第一個檔案的 filenamesCookie,依此類歸。

適用於