Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -417,20 +417,12 @@ public async ValueTask ApplyAsync(IVsAsyncFileChangeEx service, CancellationToke

case Kind.UnwatchDirectories:
Contract.ThrowIfFalse(_cookies is not null);
foreach (var unwatchCookie in _cookies)
{
await service.UnadviseDirChangeAsync(unwatchCookie, cancellationToken).ConfigureAwait(false);
}

await service.UnadviseDirChangesAsync(_cookies, cancellationToken).ConfigureAwait(false);
return;

case Kind.UnwatchFiles:
Contract.ThrowIfFalse(_tokens is not null);
foreach (var token in _tokens)
{
await service.UnadviseFileChangeAsync(token.Cookie!.Value, cancellationToken).ConfigureAwait(false);
}

await service.UnadviseFileChangesAsync(_tokens.Select(token => token.Cookie!.Value).ToArray(), cancellationToken).ConfigureAwait(false);
return;

default:
Expand Down