Share via


IVsAsyncFileChangeEx2.AdviseFileChangesAsync Method

Definition

Creates subscriptions to changes for multiple files.

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())

Parameters

filenames
IReadOnlyCollection<String>

The names of the files to subscribe to.

filter
_VSFILECHANGEFLAGS

The flags describing the changes to be notified of.

sink
IVsFreeThreadedFileChangeEvents2

The event sink.

cancellationToken
CancellationToken

The cancellation token.

Returns

A task that will complete once the subscriptions have been set up. The task's result will be the subscription cookies. The first cookie in the returned array is the cookie for the first file in the filenames, and so on.

Remarks

This method is safe to access from any thread.

Applies to