IFileSystemProvider.UnwatchAsync(WatchResult, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Stops watching a file or directory for changes.
public:
System::Threading::Tasks::ValueTask UnwatchAsync(Microsoft::VisualStudio::RpcContracts::FileSystem::WatchResult ^ watchResult, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.ValueTask UnwatchAsync (Microsoft.VisualStudio.RpcContracts.FileSystem.WatchResult watchResult, System.Threading.CancellationToken cancellationToken);
abstract member UnwatchAsync : Microsoft.VisualStudio.RpcContracts.FileSystem.WatchResult * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function UnwatchAsync (watchResult As WatchResult, cancellationToken As CancellationToken) As ValueTask
Parameters
- watchResult
- WatchResult
The value returned by the call to WatchFileAsync(Uri, CancellationToken) or WatchDirectoryAsync(Uri, Boolean, CancellationToken).
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A task representing the asynchronous operation.
Exceptions
watchResult
is null.
watchResult
doesn't correspond to a watched file or directory.