This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 'using' statement | |
// if you don't need access to the CancellationTokenRegistration | |
await using (cancellationToken.Register(() => buildManager.CancelAllSubmissions()).ConfigureAwait(false)) | |
{ | |
// disposed outside this scope | |
} | |
// 'using' statement | |
// if you need access to the CancellationTokenRegistration | |
var test = cancellationToken.Register(() => buildManager.CancelAllSubmissions()); |