51 types derived from OperationCanceledException
aspire (1)
Interaction\ExtensionOperationCanceledException.cs (1)
6public class ExtensionOperationCanceledException(string message) : OperationCanceledException(message);
BuildActionTelemetryTable (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
CodeStyleConfigFileGenerator (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
GenerateDocumentationAndConfigFiles (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Metrics (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Metrics.Legacy (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Microsoft.AspNetCore.Connections.Abstractions (1)
Exceptions\ConnectionAbortedException.cs (1)
11public class ConnectionAbortedException : OperationCanceledException
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.Analyzers (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Microsoft.CodeAnalysis.CodeStyle (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Microsoft.CodeAnalysis.Collections.Package (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.Contracts.Package (1)
ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.Debugging.Package (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.Extensions.Package (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Microsoft.CodeAnalysis.PooledObjects.Package (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Microsoft.CodeAnalysis.Threading.Package (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CodeAnalysis.Workspaces (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CommonLanguageServerProtocol.Framework.Example (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Microsoft.Extensions.Http.Resilience.Tests (1)
Hedging\OperationCanceledExceptionMock.cs (1)
8internal sealed class OperationCanceledExceptionMock : OperationCanceledException
Replay (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
Roslyn.Diagnostics.Analyzers (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
SemanticSearch.BuildTask (1)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCanceledException.cs (1)
23public class TaskCanceledException : OperationCanceledException
Test.Utilities (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
Text.Analyzers (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
22internal sealed class OperationCanceledIgnoringCallerTokenException : OperationCanceledException
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
30internal sealed class SoftCrashException : OperationCanceledException
147 instantiations of OperationCanceledException
Aspire.Cli.Tests (3)
Commands\PublishCommandPromptingIntegrationTests.cs (3)
685throw new OperationCanceledException(); 700throw new OperationCanceledException(); 722throw new OperationCanceledException();
Aspire.Dashboard (1)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (1)
188throw new OperationCanceledException("Read call was canceled.");
Aspire.Hosting (2)
ApplicationModel\ResourceNotificationService.cs (2)
140throw new OperationCanceledException($"The operation was cancelled before the resource reached one of the target states: [{string.Join(", ", targetStates)}]"); 429throw new OperationCanceledException($"The operation was cancelled before the resource met the predicate condition.");
Aspire.Hosting.Tests (1)
Helpers\DashboardServiceDataExtensions.cs (1)
27throw new OperationCanceledException($"The operation was cancelled before the resource met the predicate condition.");
dotnet-openapi (2)
Commands\BaseCommand.cs (2)
306throw new OperationCanceledException("Failed to connect, retry canceled.", cancellationToken); 337throw new OperationCanceledException("Failed to connect, retry limit exceeded.");
dotnet-svcutil-lib (2)
CmdCredentialsProvider.cs (2)
267throw new OperationCanceledException(); 286throw new OperationCanceledException();
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
353static (obj, cancellationToken) => ((Channel<TItem>)obj!).Writer.TryComplete(new OperationCanceledException(cancellationToken)),
http2cat (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
IIS.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
IIS.LongTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
IIS.NewShim.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
IISExpress.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
Metrics (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Metrics.Legacy (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Microsoft.AspNetCore.Components.Tests (7)
RendererTest.cs (3)
1444throw new OperationCanceledException(); 1477throw new OperationCanceledException(); 1512throw new OperationCanceledException();
Rendering\RendererSynchronizationContextTest.cs (4)
486throw new OperationCanceledException(); 574throw new OperationCanceledException(); 668throw new OperationCanceledException(); 756throw new OperationCanceledException();
Microsoft.AspNetCore.Http.Connections (2)
src\SignalR\common\Shared\PipeWriterStream.cs (2)
82throw new OperationCanceledException(); 99throw new OperationCanceledException();
Microsoft.AspNetCore.Http.Connections.Client (2)
src\SignalR\common\Shared\PipeWriterStream.cs (2)
82throw new OperationCanceledException(); 99throw new OperationCanceledException();
Microsoft.AspNetCore.Http.Connections.Tests (1)
TestWebSocketConnectionFeature.cs (1)
85_output.TryComplete(new OperationCanceledException());
Microsoft.AspNetCore.Http.Tests (1)
Timeouts\RequestTimeoutsMiddlewareTests.cs (1)
266throw new OperationCanceledException(context.RequestAborted);
Microsoft.AspNetCore.Mvc.Core.Test (1)
Infrastructure\JsonResultExecutorTestBase.cs (1)
444throw new OperationCanceledException();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
NewtonsoftJsonOutputFormatterTest.cs (1)
509throw new OperationCanceledException();
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (1)
444throw new OperationCanceledException();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Common\RetryHelper.cs (2)
30throw new OperationCanceledException("Failed to connect, retry canceled.", cancellationToken); 66throw new OperationCanceledException("Failed to connect, retry limit exceeded.");
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http\HttpRequestStream.cs (1)
122throw new OperationCanceledException("The read was canceled");
Internal\Http3\Http3PendingStream.cs (1)
54throw new OperationCanceledException("The read operation was canceled.");
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
Microsoft.AspNetCore.Session (3)
DistributedSession.cs (3)
235throw new OperationCanceledException("Timed out loading the session.", oex, cts.Token); 290throw new OperationCanceledException("Timed out committing the session.", oex, cts.Token); 302throw new OperationCanceledException("Timed out refreshing the session.", oex, cts.Token);
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
129throw new OperationCanceledException();
Microsoft.AspNetCore.SignalR.Client.Core (5)
HubConnection.cs (2)
1923CompleteClose(new OperationCanceledException(message)); 1954return new OperationCanceledException(message, innerException, _state.StopCts.Token);
Internal\InvocationRequest.cs (1)
163_channel.Writer.TryComplete(new OperationCanceledException());
src\SignalR\common\Shared\PipeWriterStream.cs (2)
82throw new OperationCanceledException(); 99throw new OperationCanceledException();
Microsoft.AspNetCore.SignalR.Client.Tests (3)
HttpConnectionTests.ConnectionLifecycle.cs (1)
495throw new OperationCanceledException("Cancel SSE Start.");
LongPollingTransportTests.cs (1)
655throw new OperationCanceledException();
TestTransport.cs (1)
70throw new OperationCanceledException();
Microsoft.AspNetCore.SignalR.Core (2)
HubConnectionContext.cs (2)
719CloseException ??= new OperationCanceledException($"Client hasn't sent a message/ping within the configured {nameof(HubConnectionContextOptions.ClientTimeoutInterval)}."); 789_streamTracker?.CompleteAll(new OperationCanceledException("The underlying connection was closed."));
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
ChannelExtensions.cs (1)
67throw new OperationCanceledException($"ReadAtLeastAsync canceled with {items.Count} of {minimumCount} items.");
Microsoft.AspNetCore.TestHost (3)
RequestLifetimeFeature.cs (1)
28_abort(new OperationCanceledException("The application aborted the request."));
ResponseBodyReaderStream.cs (2)
91throw new OperationCanceledException(); 111Abort(new OperationCanceledException());
Microsoft.AspNetCore.WebSockets.Tests (1)
BufferStream.cs (1)
306Abort(new OperationCanceledException());
Microsoft.Build.Tasks.UnitTests (1)
DownloadFile_Tests.cs (1)
263throw new OperationCanceledException(timeout.Token);
Microsoft.CodeAnalysis.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
SourceGeneration\GeneratorDriverTests.cs (1)
1686Func<int, CancellationToken, int> otherTimeoutFunc = (input, _) => throw new OperationCanceledException();
SourceGeneration\SyntaxAwareGeneratorTests.cs (1)
2051onInit: (i) => i.RegisterForSyntaxNotifications(() => new TestSyntaxReceiver(tag: 0, callback: (a) => { if (a is AssignmentExpressionSyntax) { throw new OperationCanceledException("Simulated cancellation from external source"); } })),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
RenameTracking\RenameTrackingTaggerProviderTests.cs (1)
889source.TrySetException(new OperationCanceledException());
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
HandlerTests.cs (2)
245var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 273var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests)));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Microsoft.CodeAnalysis.Test.Utilities (1)
Pe\BrokenStream.cs (1)
96ThrownException = new OperationCanceledException();
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\ExceptionHelpersTests.cs (1)
27throw new OperationCanceledException();
Microsoft.Extensions.AI.Evaluation.Console.Tests (11)
ExceptionUtilitiesTests.cs (11)
25var exception = new OperationCanceledException(); 41var exception = new AggregateException(new OperationCanceledException()); 60new OperationCanceledException(), 61new OperationCanceledException()); 85var exception = new AggregateException(new OperationCanceledException(), new InvalidOperationException()); 96new OperationCanceledException(), 97new OperationCanceledException()); 125var exception1 = new AggregateException(new TaskCanceledException(), new OperationCanceledException()); 126var exception2 = new AggregateException(new OperationCanceledException()); 135var exception1 = new AggregateException(new TaskCanceledException(), new OperationCanceledException()); 136var exception2 = new AggregateException(new InvalidOperationException(), new OperationCanceledException());
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (2)
DefaultHealthCheckServiceTest.cs (2)
130b.AddAsyncCheck("OperationExceptionCheck", _ => throw new OperationCanceledException(OperationCancelledMessage), operationExceptionTags); 578token.Register(() => throw new OperationCanceledException(token));
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\HttpClientLoggerTest.cs (1)
120var operationCanceledException = new OperationCanceledException();
Logging\HttpResponseBodyReaderTest.cs (1)
243var exception = new OperationCanceledException(token);
Microsoft.Extensions.Http.Polly.Tests (2)
PolicyHttpMessageHandlerTest.cs (2)
362throw new OperationCanceledException(); 397token.Register(() => throw new OperationCanceledException(token));
Microsoft.ML.AutoML (5)
API\BinaryClassificationExperiment.cs (1)
462throw new OperationCanceledException(ex.Message, ex.InnerException);
API\MulticlassClassificationExperiment.cs (1)
440throw new OperationCanceledException(ex.Message, ex.InnerException);
API\RegressionExperiment.cs (1)
455throw new OperationCanceledException(ex.Message, ex.InnerException);
AutoMLExperiment\Runner\SweepablePipelineRunner.cs (1)
108throw new OperationCanceledException(ex.Message, ex.InnerException);
Tuner\AutoZeroTuner.cs (1)
109throw new OperationCanceledException();
Microsoft.ML.Core (1)
Utilities\Contracts.cs (1)
753throw Process(new OperationCanceledException("Operation was canceled."), env);
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
Roslyn.VisualStudio.Next.UnitTests (3)
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (3)
229assemblyLoaderProvider.CreateNewShadowCopyLoaderCallback = (_, _) => throw new OperationCanceledException(); 308(_, _, _) => throw new OperationCanceledException())); 529throw new OperationCanceledException();
System.Console (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
155return new OperationCanceledException();
System.Formats.Tar (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
155return new OperationCanceledException();
System.IO.Compression.ZipFile (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
155return new OperationCanceledException();
System.IO.FileSystem.DriveInfo (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
155return new OperationCanceledException();
System.IO.FileSystem.Watcher (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
155return new OperationCanceledException();
System.IO.MemoryMappedFiles (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
155return new OperationCanceledException();
System.IO.Pipelines (3)
System\IO\Pipelines\StreamPipeReader.cs (1)
292throw new OperationCanceledException(ex.Message, ex, cancellationToken);
System\IO\Pipelines\ThrowHelper.cs (2)
75public static OperationCanceledException CreateOperationCanceledException_ReadCanceled() => new OperationCanceledException(SR.ReadCanceledOnPipeReader); 80public static OperationCanceledException CreateOperationCanceledException_FlushCanceled() => new OperationCanceledException(SR.FlushCanceledOnPipeWriter);
System.IO.Pipes (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
155return new OperationCanceledException();
System.IO.Ports (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
155return new OperationCanceledException();
System.Linq.Parallel (3)
System\Linq\Parallel\QueryOperators\QueryOperator.cs (2)
147throw new OperationCanceledException(); 217throw new OperationCanceledException();
System\Linq\Parallel\Scheduling\CancellationState.cs (1)
76throw new OperationCanceledException(oceMessage, externalCancellationToken);
System.Net.Http (2)
System\Net\Http\CancellationHelper.cs (1)
13private static readonly string s_cancellationMessage = new OperationCanceledException().Message; // use same message as the default ctor
System\Net\Http\SocketsHttpHandler\CreditWaiter.cs (1)
57((CreditWaiter)s!)._source.SetException(ExceptionDispatchInfo.SetCurrentStackTrace(new OperationCanceledException(cancellationToken)));
System.Net.NameResolution (1)
System\Net\Dns.cs (1)
777NameResolutionTelemetry.Log.AfterResolution(key!, activity, new OperationCanceledException());
System.Net.Quic (2)
src\libraries\Common\src\System\Net\StreamBuffer.cs (1)
327_waitSource.SetException(ExceptionDispatchInfo.SetCurrentStackTrace(new OperationCanceledException(cancellationToken)));
System\Net\Quic\Internal\ValueTaskSource.cs (1)
70thisRef.TrySetException(new OperationCanceledException(cancellationToken));
System.Net.WebClient (2)
src\libraries\Common\src\System\Threading\Tasks\RendezvousAwaitable.cs (2)
90SetException(token.IsCancellationRequested ? new OperationCanceledException(token) : new OperationCanceledException());
System.Net.WebSockets (4)
System\Net\WebSockets\ManagedWebSocket.cs (3)
1017throw new OperationCanceledException(nameof(WebSocketState.Aborted), inner); 1717return new OperationCanceledException( 1718new OperationCanceledException().Message,
System\Net\WebSockets\WebSocketStateHelper.cs (1)
36throw new OperationCanceledException(nameof(WebSocketState.Aborted), innerException);
System.Private.CoreLib (7)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
155return new OperationCanceledException();
src\libraries\Common\src\System\IO\Win32Marshal.cs (1)
58return new OperationCanceledException();
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.ThreadPoolValueTaskSource.cs (1)
91exception = new OperationCanceledException(_cancellationToken);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationToken.cs (1)
368throw new OperationCanceledException(SR.OperationCanceled, this);
src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (1)
254_mrvtsc.SetException(ExceptionDispatchInfo.SetCurrentStackTrace(new OperationCanceledException(cancellationToken)));
src\System\Runtime\ControlledExecution.CoreCLR.cs (2)
101OperationCanceledException e = cancellationToken.IsCancellationRequested ? new(cancellationToken) : new();
System.Text.Json (1)
System\Text\Json\ThrowHelper.Serialization.cs (1)
979throw new OperationCanceledException(SR.PipeWriterCanceled);
System.Threading (1)
System\Threading\Barrier.cs (1)
746throw new OperationCanceledException(SR.Common_OperationCanceled, cancellationToken);
System.Threading.Channels (1)
System\Threading\Channels\AsyncOperation.cs (1)
166_error = ExceptionDispatchInfo.Capture(new OperationCanceledException(cancellationToken));
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\Parallel.cs (2)
963oce = new OperationCanceledException(parallelOptions.CancellationToken); 2562oce = new OperationCanceledException(parallelOptions.CancellationToken);
Test.Utilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
353static (obj, cancellationToken) => ((Channel<TItem>)obj!).Writer.TryComplete(new OperationCanceledException(cancellationToken)),
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
356() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken)));
VBCSCompiler (2)
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (2)
156throw new OperationCanceledException(); 202throw new OperationCanceledException();
1329 references to OperationCanceledException
aspire (6)
Commands\AddCommand.cs (1)
178catch (OperationCanceledException)
Commands\ExecCommand.cs (1)
236catch (OperationCanceledException ex) when (ex.CancellationToken == cancellationToken)
Commands\PublishCommandBase.cs (1)
187catch (OperationCanceledException)
Commands\RunCommand.cs (2)
235catch (OperationCanceledException ex) when (ex.CancellationToken == cancellationToken || ex is ExtensionOperationCanceledException) 313catch (OperationCanceledException)
Templating\DotNetTemplateFactory.cs (1)
267catch (OperationCanceledException)
Aspire.Dashboard (5)
Components\Pages\ConsoleLogs.razor.cs (2)
173catch (OperationCanceledException) 556catch (Exception ex) when (ex is not OperationCanceledException)
ServiceClient\DashboardClient.cs (2)
265catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested) 455catch (Exception ex) when (ex is not OperationCanceledException)
src\Shared\TaskHelpers.cs (1)
31catch (OperationCanceledException)
Aspire.Hosting (27)
ApplicationModel\ResourceNotificationService.cs (3)
91/// will throw <see cref="OperationCanceledException"/>. 112/// will throw <see cref="OperationCanceledException"/>. 400/// will throw <see cref="OperationCanceledException"/>.
Dashboard\DashboardLifecycleHook.cs (3)
88catch (OperationCanceledException) 379catch (OperationCanceledException) 437catch (OperationCanceledException)
Dashboard\DashboardService.cs (2)
150catch (Exception ex) when (ex is not OperationCanceledException) 344catch (OperationCanceledException) when (cts.Token.IsCancellationRequested)
Dashboard\DashboardServiceData.cs (1)
80catch (Exception ex) when (ex is not OperationCanceledException)
Dcp\DcpDependencyCheck.cs (1)
112&& !(ex is OperationCanceledException && cancellationToken.IsCancellationRequested))
Dcp\DcpExecutor.cs (6)
138catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested) 178catch (OperationCanceledException) 202catch (OperationCanceledException) 319catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested) 530catch (OperationCanceledException) 1541catch (OperationCanceledException ex)
Dcp\DcpHost.cs (1)
103catch (OperationCanceledException) when (timeoutCancellation.IsCancellationRequested)
Dcp\ResourceLogSource.cs (1)
91catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested)
Exec\ExecResourceManager.cs (1)
63catch (OperationCanceledException)
Health\ResourceHealthCheckService.cs (1)
87catch (OperationCanceledException)
Orchestrator\OrchestratorHostService.cs (1)
59catch (OperationCanceledException)
Publishing\PublishingActivityProgressReporter.cs (2)
250catch (OperationCanceledException) 361catch (OperationCanceledException)
ResourceLoggerForwarderService.cs (1)
55catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested)
src\Shared\TaskHelpers.cs (1)
31catch (OperationCanceledException)
Utils\PeriodicRestartAsyncEnumerable.cs (2)
45catch (OperationCanceledException) when (!cancellationToken.IsCancellationRequested) 101catch (OperationCanceledException) when (!cancellationToken.IsCancellationRequested)
Aspire.Hosting.Azure.Tests (1)
DefaultUserPrincipalProviderTests.cs (1)
75await Assert.ThrowsAsync<OperationCanceledException>(
Aspire.Hosting.Testing (2)
DistributedApplicationFactory.cs (2)
538catch (OperationCanceledException) when (_disposingCts.IsCancellationRequested) 547catch (OperationCanceledException) when (_disposingCts.IsCancellationRequested)
Aspire.Hosting.Testing.Tests (1)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
148catch (OperationCanceledException)
Aspire.Hosting.Tests (9)
Dashboard\DashboardServiceTests.cs (1)
481catch (OperationCanceledException)
Dashboard\ResourcePublisherTests.cs (1)
58catch (OperationCanceledException)
Dcp\DcpExecutorTests.cs (1)
635await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await moveNextTask);
ResourceNotificationTests.cs (3)
275await Assert.ThrowsAsync<OperationCanceledException>(async () => 290await Assert.ThrowsAsync<OperationCanceledException>(async () => 307await Assert.ThrowsAsync<OperationCanceledException>(async () =>
Utils\LoggerNotificationExtensions.cs (1)
148catch (OperationCanceledException)
Utils\PeriodicRestartAsyncEnumerableTests.cs (2)
19await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => 42await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
Aspire.Playground.Tests (1)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
148catch (OperationCanceledException)
BuildActionTelemetryTable (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
ClientSample (2)
RawSample.cs (2)
62catch (AggregateException aex) when (aex.InnerExceptions.All(e => e is OperationCanceledException)) 65catch (OperationCanceledException)
CodeStyleConfigFileGenerator (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
csc (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
352catch (OperationCanceledException) 425catch (Exception e) when (!(e is TaskCanceledException || e is OperationCanceledException))
dotnet-openapi (1)
Application.cs (1)
84catch (OperationCanceledException)
dotnet-svcutil-lib (7)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (2)
950catch (OperationCanceledException) 1014catch (OperationCanceledException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ProducerConsumerStream.cs (2)
43catch (OperationCanceledException oce) 100catch (OperationCanceledException oce)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketHelper.cs (3)
148Exception exception = FxTrace.Exception.AsError<OperationCanceledException>(aggregationException); 149OperationCanceledException operationCanceledException = exception as OperationCanceledException;
GenerateDocumentationAndConfigFiles (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
HttpStress (2)
Program.cs (2)
229catch (OperationCanceledException) { } 317catch (OperationCanceledException) { }
IIS.Tests (3)
ClientDisconnectTests.cs (3)
95Assert.IsType<OperationCanceledException>(exception); 177Assert.IsType<OperationCanceledException>(exception); 218Assert.IsType<OperationCanceledException>(exception);
InMemory.FunctionalTests (10)
Http2\Http2StreamTests.cs (6)
3422OperationCanceledException thrownEx = null; 3429var thrownExTask = Assert.ThrowsAnyAsync<OperationCanceledException>(() => context.Request.Body.ReadAsync(buffer, 0, buffer.Length)); 3449OperationCanceledException thrownEx = null; 3454var thrownExTask = Assert.ThrowsAnyAsync<OperationCanceledException>(() => context.Request.Body.ReadAsync(buffer, 0, buffer.Length)); 3796await Assert.ThrowsAsync<OperationCanceledException>(() => context.Response.WriteAsync("hello,", new CancellationToken(true))); 3833await Assert.ThrowsAsync<OperationCanceledException>(() => writeTask);
Http2\PipeReaderFactory.cs (1)
39catch (OperationCanceledException)
RequestTests.cs (1)
142catch (OperationCanceledException)
ResponseTests.cs (1)
206await Assert.ThrowsAsync<OperationCanceledException>(() => appTcs.Task).DefaultTimeout();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1066catch (OperationCanceledException)
Interop.FunctionalTests (3)
Http3\Http3RequestTests.cs (1)
516await Assert.ThrowsAnyAsync<OperationCanceledException>(() => responseTask).DefaultTimeout();
HttpClientHttp2InteropTests.cs (2)
744await Assert.ThrowsAnyAsync<OperationCanceledException>(() => clientEcho.Task.DefaultTimeout()); 803await Assert.ThrowsAnyAsync<OperationCanceledException>(() => clientEcho.Task.DefaultTimeout());
Metrics (17)
Program.cs (1)
34catch (OperationCanceledException)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Metrics.Legacy (17)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\RoslynAnalyzers\Tools\Metrics\Program.cs (1)
34catch (OperationCanceledException)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Microsoft.AspNetCore.Components (2)
NavigationManager.cs (1)
486catch (OperationCanceledException)
Rendering\ComponentState.cs (1)
149catch (OperationCanceledException cex)
Microsoft.AspNetCore.Components.Tests (7)
RendererTest.cs (3)
1463await Assert.ThrowsAnyAsync<OperationCanceledException>(() => task); 1495await Assert.ThrowsAnyAsync<OperationCanceledException>(() => task); 1531await Assert.ThrowsAnyAsync<OperationCanceledException>(() => task);
Rendering\RendererSynchronizationContextTest.cs (4)
491await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await task); 579await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await task); 673await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await task); 761await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await task);
Microsoft.AspNetCore.Components.Web (1)
Virtualization\Virtualize.cs (1)
435if (e is OperationCanceledException oce && oce.CancellationToken == cancellationToken)
Microsoft.AspNetCore.Components.WebView.Photino (4)
PhotinoSynchronizationContext.cs (4)
70catch (OperationCanceledException) 94catch (OperationCanceledException) 118catch (OperationCanceledException) 142catch (OperationCanceledException)
Microsoft.AspNetCore.Diagnostics (2)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
120if ((ex is OperationCanceledException || ex is IOException) && context.RequestAborted.IsCancellationRequested)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
117if ((edi.SourceException is OperationCanceledException || edi.SourceException is IOException) && context.RequestAborted.IsCancellationRequested)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Latency\RequestLatencyTelemetryMiddlewareTests.cs (1)
265Assert.IsAssignableFrom<OperationCanceledException>(e);
Microsoft.AspNetCore.Http (3)
Timeouts\RequestTimeoutPolicy.cs (2)
17/// Status code to be set in response when a timeout results in an <see cref="OperationCanceledException" /> being caught by the middleware. 25/// This is called if a timeout results in an <see cref="OperationCanceledException" /> being caught by the middleware.
Timeouts\RequestTimeoutsMiddleware.cs (1)
109catch (OperationCanceledException operationCanceledException)
Microsoft.AspNetCore.Http.Connections (7)
Internal\HttpConnectionContext.cs (2)
391catch (OperationCanceledException) 572catch (OperationCanceledException)
Internal\HttpConnectionDispatcher.cs (1)
501catch (OperationCanceledException)
Internal\Transports\LongPollingServerTransport.cs (1)
66catch (OperationCanceledException)
Internal\Transports\ServerSentEventsServerTransport.cs (1)
80catch (OperationCanceledException)
Internal\Transports\WebSocketsServerTransport.cs (2)
178catch (OperationCanceledException) 242catch (OperationCanceledException ex) when (ex.CancellationToken == _connection.SendingToken)
Microsoft.AspNetCore.Http.Connections.Client (5)
Internal\LongPollingTransport.cs (2)
162catch (OperationCanceledException) 209catch (OperationCanceledException)
Internal\SendUtils.cs (1)
73catch (OperationCanceledException)
Internal\ServerSentEventsTransport.cs (1)
157catch (OperationCanceledException)
Internal\WebSocketsTransport.cs (1)
499catch (OperationCanceledException)
Microsoft.AspNetCore.Http.Extensions (7)
HttpResponseJsonExtensions.cs (5)
139catch (OperationCanceledException) { } 181catch (OperationCanceledException) { } 197catch (OperationCanceledException) { } 295catch (OperationCanceledException) { } 338catch (OperationCanceledException) { }
SendFileResponseExtensions.cs (2)
104catch (OperationCanceledException) when (useRequestAborted) { } 122catch (OperationCanceledException) when (useRequestAborted) { }
Microsoft.AspNetCore.Http.Extensions.Tests (4)
HttpResponseJsonExtensionsTests.cs (2)
389await Assert.ThrowsAnyAsync<OperationCanceledException>(() => context.Response.WriteAsJsonAsync(AsyncEnumerable(), typeof(IAsyncEnumerable<int>), cts.Token)); 423await Assert.ThrowsAnyAsync<OperationCanceledException>(() => context.Response.WriteAsJsonAsync(AsyncEnumerable(), cts.Token));
SendFileResponseExtensionsTests.cs (2)
55await Assert.ThrowsAnyAsync<OperationCanceledException>( 69await Assert.ThrowsAsync<OperationCanceledException>(
Microsoft.AspNetCore.Http.Results (2)
src\Shared\ResultsHelpers\FileResultHelper.cs (2)
47catch (OperationCanceledException) 82catch (OperationCanceledException)
Microsoft.AspNetCore.Http.Tests (1)
Timeouts\RequestTimeoutsMiddlewareTests.cs (1)
248await Assert.ThrowsAsync<OperationCanceledException>(() => middleware.Invoke(context));
Microsoft.AspNetCore.Identity (2)
DefaultPasskeyHandler.cs (2)
43if (ex is OperationCanceledException) 65if (ex is OperationCanceledException)
Microsoft.AspNetCore.Mvc.Core (5)
Formatters\SystemTextJsonOutputFormatter.cs (1)
101catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { }
Infrastructure\SystemTextJsonResultExecutor.cs (2)
71catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { } 85catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested)
src\Shared\ResultsHelpers\FileResultHelper.cs (2)
47catch (OperationCanceledException) 82catch (OperationCanceledException)
Microsoft.AspNetCore.Mvc.Core.Test (1)
Infrastructure\JsonResultExecutorTestBase.cs (1)
438await Assert.ThrowsAsync<OperationCanceledException>(() => executor.ExecuteAsync(context, result));
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
NewtonsoftJsonOutputFormatter.cs (1)
161catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { }
NewtonsoftJsonResultExecutor.cs (1)
112catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { }
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
NewtonsoftJsonOutputFormatterTest.cs (1)
503await Assert.ThrowsAsync<OperationCanceledException>(() => formatter.WriteResponseBodyAsync(outputFormatterContext, Encoding.GetEncoding("utf-8")));
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (1)
438await Assert.ThrowsAsync<OperationCanceledException>(() => executor.ExecuteAsync(context, result));
Microsoft.AspNetCore.OpenApi.Tests (4)
Extensions\OpenApiServiceCollectionExtensionsTests.cs (1)
297await Assert.ThrowsAsync<OperationCanceledException>(async () =>
Transformers\DocumentTransformerTests.cs (1)
261catch (OperationCanceledException)
Transformers\OperationTransformerTests.cs (1)
592catch (OperationCanceledException)
Transformers\SchemaTransformerTests.cs (1)
877catch (OperationCanceledException)
Microsoft.AspNetCore.OutputCaching (3)
OutputCacheEntryFormatter.cs (1)
62catch (OperationCanceledException)
OutputCacheMiddleware.cs (2)
318catch (OperationCanceledException) 348catch (OperationCanceledException)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
108catch (OperationCanceledException) when (_disposed)
Microsoft.AspNetCore.RateLimiting (1)
RateLimitingMiddleware.cs (1)
237if (ex is OperationCanceledException && context.RequestAborted.IsCancellationRequested)
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingMiddleware.cs (1)
191catch (OperationCanceledException)
Microsoft.AspNetCore.Server.HttpSys (2)
RequestProcessing\RequestContextOfT.cs (2)
63if ((ex is OperationCanceledException || ex is IOException) && DisconnectToken.IsCancellationRequested) 98else if ((ex is OperationCanceledException || ex is IOException) && DisconnectToken.IsCancellationRequested)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
Listener\RequestBodyTests.cs (1)
191await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await responseTask);
Listener\ResponseBodyTests.cs (4)
248await Assert.ThrowsAnyAsync<OperationCanceledException>(() => responseTask); 284await Assert.ThrowsAnyAsync<OperationCanceledException>(() => responseTask); 319await Assert.ThrowsAnyAsync<OperationCanceledException>(() => responseTask); 346await Assert.ThrowsAnyAsync<OperationCanceledException>(() => responseTask);
Listener\ServerTests.cs (1)
38await Assert.ThrowsAnyAsync<OperationCanceledException>(() => responseTask);
ResponseSendFileTests.cs (2)
523await Assert.ThrowsAnyAsync<OperationCanceledException>(() => responseTask); 566await Assert.ThrowsAnyAsync<OperationCanceledException>(() => responseTask);
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpContextOfT.cs (1)
47if ((ex is OperationCanceledException || ex is IOException) && ClientDisconnected)
Core\OutputProducer.cs (1)
112catch (OperationCanceledException)
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Internal\Http\Http1MessageBody.cs (1)
101catch (OperationCanceledException ex) when (ex is ConnectionAbortedException || ex is TaskCanceledException)
Internal\Http\HttpProtocol.cs (1)
715if ((ex is OperationCanceledException || ex is IOException) && _connectionAborted)
Internal\Http3\Http3OutputProducer.cs (1)
456catch (OperationCanceledException)
Internal\Infrastructure\PipeWriterHelpers\TimingPipeFlusher.cs (1)
93catch (OperationCanceledException ex) when (outputAborter is object)
LocalhostListenOptions.cs (2)
38catch (Exception ex) when (!(ex is IOException or OperationCanceledException)) 52catch (Exception ex) when (!(ex is IOException or OperationCanceledException))
Middleware\HttpsConnectionMiddleware.cs (1)
188catch (OperationCanceledException ex)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
AddressBinderTests.cs (1)
243await Assert.ThrowsAsync<OperationCanceledException>(() =>
TlsListenerTests.cs (3)
73await Assert.ThrowsAnyAsync<OperationCanceledException>(() => listener.OnTlsClientHelloAsync(transportConnection, cts.Token)); 96await Assert.ThrowsAnyAsync<OperationCanceledException>(() => listener.OnTlsClientHelloAsync(transportConnection, cts.Token)); 121await Assert.ThrowsAnyAsync<OperationCanceledException>(() => listenerTask);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1066catch (OperationCanceledException)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Internal\NamedPipeConnectionListener.cs (1)
136catch (OperationCanceledException) when (_listeningToken.IsCancellationRequested)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionContext.cs (1)
176catch (OperationCanceledException)
Microsoft.AspNetCore.Session (5)
DistributedSession.cs (4)
232catch (OperationCanceledException oex) when (!cancellationToken.IsCancellationRequested && cts.IsCancellationRequested) 264catch (OperationCanceledException) 287catch (OperationCanceledException oex) when (!cancellationToken.IsCancellationRequested && cts.IsCancellationRequested) 299catch (OperationCanceledException oex) when (!cancellationToken.IsCancellationRequested && cts.IsCancellationRequested)
SessionMiddleware.cs (1)
102catch (OperationCanceledException)
Microsoft.AspNetCore.Session.Tests (3)
SessionTests.cs (3)
756await Assert.ThrowsAsync<OperationCanceledException>(() => context.Session.LoadAsync()); 804await Assert.ThrowsAsync<OperationCanceledException>(() => context.Session.LoadAsync(token)); 985await Assert.ThrowsAsync<OperationCanceledException>(() => context.Session.CommitAsync(token));
Microsoft.AspNetCore.SignalR.Client.Core (6)
HubConnection.cs (4)
984catch (OperationCanceledException) 1576catch (OperationCanceledException ex) 1851catch (OperationCanceledException ex) 1950private OperationCanceledException GetOperationCanceledException(string message, Exception innerException, CancellationToken cancellationToken)
Internal\InvocationRequest.cs (2)
159Activity.SetTag("error.type", typeof(OperationCanceledException).FullName); 224Activity.SetTag("error.type", typeof(OperationCanceledException).FullName);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (7)
HubConnectionTests.cs (5)
575var ex = Assert.ThrowsAsync<OperationCanceledException>(async () => 894var ex = await Assert.ThrowsAsync<OperationCanceledException>(async () => 1021await Assert.ThrowsAnyAsync<OperationCanceledException>(() => connection.StreamAsChannelAsync<int>("Stream", 5, cts.Token).DefaultTimeout()); 2124catch (OperationCanceledException)
HubConnectionTests.Tracing.cs (2)
450Assert.Equal(typeof(OperationCanceledException).FullName, tags["error.type"]); 459Assert.Equal(typeof(OperationCanceledException).FullName, tags["error.type"]);
Microsoft.AspNetCore.SignalR.Client.Tests (8)
HttpConnectionTests.ConnectionLifecycle.cs (1)
451Assert.IsType<OperationCanceledException>(innerInnerEx);
HubConnectionTests.ConnectionLifecycle.cs (2)
516await Assert.ThrowsAnyAsync<OperationCanceledException>(() => hubConnection.StartAsync()).DefaultTimeout(); 594await Assert.ThrowsAnyAsync<OperationCanceledException>(() => startTask).DefaultTimeout();
HubConnectionTests.cs (1)
237await Assert.ThrowsAsync<OperationCanceledException>(() => sendTask.DefaultTimeout());
HubConnectionTests.Reconnect.cs (4)
265Assert.IsType<OperationCanceledException>(closeError); 356Assert.IsType<OperationCanceledException>(closeError); 1036Assert.IsType<OperationCanceledException>(await closedErrorTcs.Task.DefaultTimeout()); 1111Assert.IsType<OperationCanceledException>(await closedErrorTcs.Task.DefaultTimeout());
Microsoft.AspNetCore.SignalR.Core (3)
HubConnectionContext.cs (1)
633catch (OperationCanceledException)
HubConnectionHandler.cs (1)
182catch (OperationCanceledException)
Internal\DefaultHubDispatcher.cs (1)
580if (!(ex is OperationCanceledException && streamCts.IsCancellationRequested))
Microsoft.AspNetCore.SignalR.Tests (6)
EndToEndTests.cs (2)
281catch (OperationCanceledException) 573catch (OperationCanceledException)
HubConnectionHandlerTests.cs (4)
2889var ex = Assert.IsType<OperationCanceledException>(state.DisconnectedException); 4585var exception = await Assert.ThrowsAsync<OperationCanceledException>(() => task).DefaultTimeout();
Microsoft.AspNetCore.SignalR.Tests.Utils (2)
ChannelExtensions.cs (1)
65catch (OperationCanceledException)
src\Shared\SignalR\InProcessTestServer.cs (1)
120catch (OperationCanceledException)
Microsoft.AspNetCore.SpaProxy (2)
SpaProxyLaunchManager.cs (2)
87exception is OperationCanceledException) 118exception is OperationCanceledException)
Microsoft.AspNetCore.SpaServices.Extensions (2)
AngularCli\AngularCliBuilder.cs (1)
79catch (OperationCanceledException ex)
Proxying\SpaProxy.cs (1)
106catch (OperationCanceledException)
Microsoft.AspNetCore.StaticAssets (2)
StaticAssetsInvoker.cs (2)
196catch (OperationCanceledException ex) 236catch (OperationCanceledException ex)
Microsoft.AspNetCore.StaticFiles (2)
StaticFileContext.cs (2)
358catch (OperationCanceledException ex) 391catch (OperationCanceledException ex)
Microsoft.AspNetCore.TestHost.Tests (20)
ClientHandlerTests.cs (2)
458await Assert.ThrowsAsync<OperationCanceledException>(() => readTask.DefaultTimeout()); 481await Assert.ThrowsAsync<OperationCanceledException>(() => readTask.DefaultTimeout());
HttpContextBuilderTests.cs (5)
212await Assert.ThrowsAsync<OperationCanceledException>(() => readTask.DefaultTimeout()); 236await Assert.ThrowsAsync<OperationCanceledException>(() => contextTask.DefaultTimeout()); 262await Assert.ThrowsAsync<OperationCanceledException>(() => readTask.DefaultTimeout()); 343var ex = await Assert.ThrowsAsync<OperationCanceledException>(() => server.SendAsync(c => { }));
RequestLifetimeTests.cs (4)
28var ex = await Assert.ThrowsAsync<OperationCanceledException>(() => client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead)); 44var ex = await Assert.ThrowsAsync<OperationCanceledException>(() => client.GetAsync("/", HttpCompletionOption.ResponseHeadersRead));
TestClientTests.cs (9)
290catch (OperationCanceledException) 543await ExceptionAssert.ThrowsAsync<OperationCanceledException>( 734await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await client.ConnectAsync(new Uri("http://localhost"), tokenSource.Token)); 856var exception = await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await tcs.Task); 880var response = await Assert.ThrowsAnyAsync<OperationCanceledException>(() => client.GetAsync("http://localhost:12345", cts.Token)); 882var exception = await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await tcs.Task);
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Autobahn\AutobahnTester.cs (1)
95catch (OperationCanceledException)
Microsoft.AspNetCore.WebSockets.Tests (1)
WebSocketMiddlewareTests.cs (1)
605catch (OperationCanceledException)
Microsoft.Build (3)
BackEnd\BuildManager\BuildManager.cs (2)
2525catch (AggregateException ex) when (ex.InnerExceptions.All(inner => inner is OperationCanceledException)) 2529catch (OperationCanceledException)
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
316return e.Flatten().InnerExceptions.All(ex => ex is TaskCanceledException || ex is OperationCanceledException);
Microsoft.Build.Tasks.CodeAnalysis (14)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
578catch (OperationCanceledException)
src\Compilers\Shared\BuildServerConnection.cs (2)
352catch (OperationCanceledException) 425catch (Exception e) when (!(e is TaskCanceledException || e is OperationCanceledException))
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.Build.Tasks.CodeAnalysis.Sdk (14)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
578catch (OperationCanceledException)
src\Compilers\Shared\BuildServerConnection.cs (2)
352catch (OperationCanceledException) 425catch (Exception e) when (!(e is TaskCanceledException || e is OperationCanceledException))
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.Build.Tasks.Core (10)
AssemblyDependency\Node\OutOfProcRarNode.cs (2)
46catch (OperationCanceledException) 120catch (OperationCanceledException)
AssemblyDependency\Node\OutOfProcRarNodeEndpoint.cs (2)
43catch (OperationCanceledException) 88catch (Exception e) when (e is not OperationCanceledException)
Copy.cs (3)
465catch (OperationCanceledException) 928catch (OperationCanceledException) 963catch (OperationCanceledException)
DownloadFile.cs (2)
105catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken) 122catch (OperationCanceledException delayException) when (delayException.CancellationToken == cancellationToken)
Unzip.cs (1)
136catch (OperationCanceledException)
Microsoft.CodeAnalysis (23)
CommandLine\CommonCompiler.cs (1)
784catch (OperationCanceledException)
Diagnostic\LocalizableString.cs (1)
111if (ex is OperationCanceledException)
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
719if (innerException == null || innerException is OperationCanceledException)
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1276if ((ex as OperationCanceledException)?.CancellationToken == cancellationToken)
DiagnosticAnalyzer\AnalyzerManager.cs (3)
81catch (OperationCanceledException) 120catch (OperationCanceledException) 152catch (OperationCanceledException)
InternalUtilities\ExceptionExtensions.cs (3)
13/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 17/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 19=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
InternalUtilities\RoslynParallel.cs (1)
37catch (OperationCanceledException e) when (cancellationToken.IsCancellationRequested && e.CancellationToken != cancellationToken)
PEWriter\MetadataWriter.cs (2)
1750catch (Exception e) when (e is not OperationCanceledException) 1769catch (Exception e) when (!(e is OperationCanceledException))
PEWriter\MetadataWriter.PortablePdb.cs (1)
857catch (Exception e) when (!(e is OperationCanceledException))
PEWriter\PeWriter.cs (2)
230catch (Exception e) when (!(e is OperationCanceledException)) 307catch (Exception e) when (!(e is OperationCanceledException))
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (4)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.Analyzers (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Microsoft.CodeAnalysis.AnalyzerUtilities (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Microsoft.CodeAnalysis.BannedApiAnalyzers (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Microsoft.CodeAnalysis.CodeStyle (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Microsoft.CodeAnalysis.Collections.Package (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.Contracts.Package (11)
ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
FixInterpolatedVerbatimString\FixInterpolatedVerbatimStringCommandHandler.cs (1)
52catch (OperationCanceledException)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\CompilationEmitTests.cs (2)
5489Assert.Throws<OperationCanceledException>(() => comp.Emit(peStream, 5511Assert.Throws<OperationCanceledException>(() => compilation.Emit(broken));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4241catch (OperationCanceledException ex) when (ex.CancellationToken == analyzer.CancellationToken)
Diagnostics\DiagnosticSuppressorTests.cs (1)
681Assert.Throws<OperationCanceledException>(() => compilation.GetAnalyzerDiagnostics(analyzersAndSuppressors, reportSuppressedDiagnostics: true, cancellationToken: cancellationToken));
Diagnostics\GetDiagnosticsTests.cs (1)
878await Assert.ThrowsAsync<OperationCanceledException>(() => compilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync(tree, analyzer.CancellationToken));
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (4)
InteractiveSessionTests.cs (4)
2050Assert.IsType<OperationCanceledException>(state3.Exception); 2084Assert.IsType<OperationCanceledException>(state3.Exception); 2116await Assert.ThrowsAsync<OperationCanceledException>(() => 2117s3.RunAsync(globals, catchException: e => e is not OperationCanceledException, cancellationToken: cancellationSource.Token));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
SourceGeneration\GeneratorDriverTests.cs (5)
763Assert.Throws<OperationCanceledException>(() => 1713Assert.Throws<OperationCanceledException>(() => timeoutFunc(30, new CancellationToken(true))); 1714Assert.Throws<OperationCanceledException>(() => userTimeoutFunc(30, new CancellationToken(true))); 1717Assert.Throws<OperationCanceledException>(() => otherTimeoutFunc(30, CancellationToken.None)); 2603Assert.Throws<OperationCanceledException>(() => driver = driver.RunGenerators(compilation, cancellationToken: cts.Token));
SourceGeneration\SyntaxAwareGeneratorTests.cs (3)
1996Assert.Throws<OperationCanceledException>(() => driver = driver.RunGenerators(compilation, cancellationToken: cts.Token)); 2025Assert.Throws<OperationCanceledException>(() => driver = driver.RunGenerators(compilation, cancellationToken: cts.Token)); 2060Assert.IsType<OperationCanceledException>(results.Results[0].Exception);
Microsoft.CodeAnalysis.Debugging.Package (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.EditorFeatures (29)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
83catch (OperationCanceledException)
AutomaticCompletion\BraceCompletionSessionProvider.BraceCompletionSession.cs (3)
86catch (OperationCanceledException) 199catch (OperationCanceledException) 300catch (OperationCanceledException)
AutomaticCompletion\BraceCompletionSessionProvider.cs (1)
58catch (OperationCanceledException)
DocumentationComments\AbstractXmlTagCompletionCommandHandler.cs (1)
61catch (OperationCanceledException)
DocumentationComments\DocumentationCommentSuggestion.cs (2)
129catch (OperationCanceledException) 172catch (OperationCanceledException operationCanceledException)
EditAndContinue\ActiveStatementTrackingService.cs (3)
182catch (OperationCanceledException) 249catch (OperationCanceledException) 381catch (OperationCanceledException)
Editor\EditorLayerExtensionManager.cs (1)
50Debug.Assert(exception is not OperationCanceledException);
Formatting\FormatCommandHandler.cs (1)
115catch (OperationCanceledException)
Formatting\FormatCommandHandler.Paste.cs (1)
37catch (OperationCanceledException)
GoOrFind\AbstractGoOrFindNavigationService.cs (1)
134catch (OperationCanceledException)
InlineRename\InlineRenameSession.cs (1)
853catch (OperationCanceledException)
IntelliSense\AsyncCompletion\CommitManager.cs (1)
234catch (OperationCanceledException e) when (e.CancellationToken != cancellationToken && FatalError.ReportAndCatch(e))
IntelliSense\NavigationActionFactory.cs (1)
85catch (OperationCanceledException)
LanguageServer\AbstractInProcLanguageClient.cs (1)
195e.Handle(ex => ex is OperationCanceledException);
NavigationBar\NavigationBarController.cs (1)
286catch (OperationCanceledException)
NavigationBar\NavigationBarController_ModelComputation.cs (1)
53catch (OperationCanceledException ex) when (ExceptionUtilities.IsCurrentOperationBeingCancelled(ex, linkedTokenSource.Token))
Preview\SolutionPreviewResult.cs (1)
80catch (OperationCanceledException)
QuickInfo\OnTheFlyDocsView.xaml.cs (1)
243catch (OperationCanceledException)
Shared\Utilities\ResettableDelay.cs (1)
73catch (OperationCanceledException)
Shared\Utilities\ThreadingContext.cs (2)
84catch (OperationCanceledException) 91ex.Handle(inner => inner is OperationCanceledException);
Suggestions\SuggestedActions\SuggestedAction.cs (1)
127catch (OperationCanceledException)
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (1)
221catch (OperationCanceledException ex) when (ExceptionUtilities.IsCurrentOperationBeingCancelled(ex, linkedTokenSource.Token))
Tagging\TaggerMainThreadManager.cs (1)
53catch (OperationCanceledException ex)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
770catch (OperationCanceledException) when (analyzer.CancellationToken.IsCancellationRequested)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (3)
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.Extensions.Package (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.ExternalAccess.Copilot (1)
Internal\SemanticSearch\CopilotSemanticSearchQueryExecutor.cs (1)
125catch (OperationCanceledException) when (cancellationSource.IsCancellationRequested)
Microsoft.CodeAnalysis.Features (18)
AddImport\AbstractAddImportFeatureService.cs (2)
251catch (OperationCanceledException ex) when (ex.CancellationToken == linkedTokenSource.Token) 308catch (OperationCanceledException ex) when (ex.CancellationToken == linkedTokenSource.Token)
CodeFixes\Service\CodeFixService.cs (1)
854catch (Exception e) when (e is not OperationCanceledException)
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (1)
180catch (OperationCanceledException)
CodeLens\CodeLensReferencesService.cs (1)
70catch (OperationCanceledException)
CodeRefactorings\CodeRefactoringService.cs (1)
156catch (OperationCanceledException)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
122=> (ex as OperationCanceledException)?.CancellationToken == cancellationToken;
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.CompilationManager.cs (1)
91if (ex is not OperationCanceledException && crashOnAnalyzerException)
Extensions\ExtensionFolder.cs (1)
102catch (Exception ex) when (ex is not OperationCanceledException)
Extensions\ExtensionMessageHandlerService.cs (1)
242catch (Exception ex) when (ex is not OperationCanceledException)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingIdleProcessor.cs (1)
142catch (OperationCanceledException)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (4)
119catch (OperationCanceledException oce) 133if (ae.InnerExceptions.Any(e => e is not OperationCanceledException) || 134ae.InnerExceptions.Cast<OperationCanceledException>().Any(NotOurShutdownToken)) 144private bool NotOurShutdownToken(OperationCanceledException oce)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs (2)
219catch (OperationCanceledException) 236if (flattened.InnerExceptions.All(e => e is OperationCanceledException))
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (1)
126catch (OperationCanceledException)
Microsoft.CodeAnalysis.InteractiveHost (16)
Interactive\Core\InteractiveHost.cs (1)
256catch (OperationCanceledException)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\RoslynLogger.cs (1)
61if (exception is OperationCanceledException { InnerException: { } oceInnerException })
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\QueueItem.cs (2)
126if (ex is OperationCanceledException) 222catch (OperationCanceledException ex)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (2)
206catch (OperationCanceledException ex) when (ex.CancellationToken == _cancelSource.Token) 276catch (OperationCanceledException)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Microsoft.CodeAnalysis.PooledObjects.Package (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.PublicApiAnalyzers (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (1)
113if (exception is OperationCanceledException { InnerException: { } oceInnerException })
Microsoft.CodeAnalysis.Remote.Workspaces (2)
BrokeredServiceConnection.cs (1)
327if (exception is OperationCanceledException)
RemoteCallback.cs (1)
215if (exception is OperationCanceledException)
Microsoft.CodeAnalysis.ResxSourceGenerator (17)
AbstractResxGenerator.cs (1)
201catch (OperationCanceledException) when (context.CancellationToken.IsCancellationRequested)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Microsoft.CodeAnalysis.Threading.Package (12)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
Microsoft.CodeAnalysis.UnitTests (3)
AsyncQueueTests.cs (3)
106catch (OperationCanceledException) 132catch (OperationCanceledException) 155catch (OperationCanceledException)
Microsoft.CodeAnalysis.Workspaces (23)
ExtensionManager\AbstractExtensionManager.cs (1)
35if (exception is OperationCanceledException)
ExtensionManager\IExtensionManager.cs (1)
16/// exception, so this should not do anything in the case of <see cref="OperationCanceledException"/>.
ExtensionManager\ServicesLayerExtensionManager.cs (1)
19Debug.Assert(exception is not OperationCanceledException);
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
457catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested)
Workspace\Solution\TextLoader.cs (3)
59/// <exception cref="OperationCanceledException"/> 81/// <exception cref="OperationCanceledException"/> 91/// <exception cref="OperationCanceledException"/>
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Rpc\RpcClient.cs (1)
179catch (OperationCanceledException)
src\Workspaces\MSBuild\BuildHost\Rpc\Contracts\TextReaderExtensions.cs (1)
28catch (OperationCanceledException)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (15)
src\Compilers\Core\Portable\InternalUtilities\ExceptionExtensions.cs (3)
13/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 17/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 19=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Compilers\Core\Portable\InternalUtilities\RoslynParallel.cs (1)
37catch (OperationCanceledException e) when (cancellationToken.IsCancellationRequested && e.CancellationToken != cancellationToken)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
RpcTests.cs (1)
213await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await rpcPair.Client.InvokeAsync<string>(targetObject: 0, nameof(ObjectWithHelloMethod.Hello), [], tokenSource.Token));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\UseExportProviderAttribute.cs (1)
147catch (OperationCanceledException ex) when (timeoutTokenSource.IsCancellationRequested)
Microsoft.CodeAnalysis.Workspaces.UnitTests (14)
FindAllDeclarationsTests.cs (7)
121await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => 287await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => 392await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => 459await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => 526await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => 590await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => 654await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
UtilityTest\AsyncLazyTests.cs (5)
188catch (OperationCanceledException oce) 218var operationCancelledException = (OperationCanceledException)ex.Flatten().InnerException!; 248var thrownException = Assert.Throws<OperationCanceledException>(() =>
UtilityTest\ExceptionHelpersTests.cs (1)
48catch (OperationCanceledException)
UtilityTest\TaskExtensionsTests.cs (1)
21Assert.Throws<OperationCanceledException>(() => new TaskCompletionSource<int>().Task.WaitAndGetResult_CanCallOnBackground(new CancellationToken(canceled: true)));
Microsoft.CommonLanguageServerProtocol.Framework.Example (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.CommonLanguageServerProtocol.Framework.Package (15)
QueueItem.cs (2)
126if (ex is OperationCanceledException) 222catch (OperationCanceledException ex)
RequestExecutionQueue.cs (2)
206catch (OperationCanceledException ex) when (ex.CancellationToken == _cancelSource.Token) 276catch (OperationCanceledException)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
165if (e.InnerException is OperationCanceledException)
Microsoft.DotNet.Helix.Client (1)
HelixApi.cs (1)
20exception is OperationCanceledException ||
Microsoft.DotNet.Helix.Sdk (4)
AzureDevOpsTask.cs (2)
188ex is OperationCanceledException || 214catch (OperationCanceledException ocex) when (ocex.CancellationToken == cancellationToken)
HelixTask.cs (1)
71catch (OperationCanceledException ocex) when (ocex.CancellationToken == _cancel.Token)
WaitForHelixJobCompletion.cs (1)
77catch (OperationCanceledException)
Microsoft.Extensions.AI (8)
ChatCompletion\FunctionInvokingChatClient.cs (1)
845if (e is OperationCanceledException)
ChatCompletion\LoggingChatClient.cs (3)
87catch (OperationCanceledException) 120catch (OperationCanceledException) 145catch (OperationCanceledException)
Embeddings\LoggingEmbeddingGenerator.cs (1)
78catch (OperationCanceledException)
SpeechToText\LoggingSpeechToTextClient.cs (3)
90catch (OperationCanceledException) 123catch (OperationCanceledException) 148catch (OperationCanceledException)
Microsoft.Extensions.AI.Evaluation.Console (2)
Utilities\ExceptionUtilities.cs (2)
14OperationCanceledException => true, 39else if (current is OperationCanceledException)
Microsoft.Extensions.AI.Evaluation.Console.Tests (1)
ExceptionUtilitiesTests.cs (1)
25var exception = new OperationCanceledException();
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\ServerSentEvents\SseParser_1.cs (1)
191/// <exception cref="OperationCanceledException">The enumeration was canceled. May propagate out of a call to <see cref="IAsyncEnumerator{T}.MoveNextAsync"/>.</exception>
Microsoft.Extensions.AI.Tests (1)
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (1)
232await Assert.ThrowsAnyAsync<OperationCanceledException>(() => result1);
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.StampedeStateT.cs (2)
209catch (OperationCanceledException) when (SharedToken.IsCancellationRequested) 285if (ex is OperationCanceledException && SharedToken.IsCancellationRequested)
Microsoft.Extensions.Caching.Hybrid.Tests (4)
StampedeTests.cs (4)
225var ex = Assert.Throws<OperationCanceledException>(() => result.GetAwaiter().GetResult()); 308var ex = Assert.Throws<OperationCanceledException>(() => result.GetAwaiter().GetResult());
Microsoft.Extensions.Diagnostics.ExceptionSummarization (3)
ExceptionSummarizationBuilderExtensions.cs (1)
17/// Registers a summary provider that handles <see cref="OperationCanceledException"/>, <see cref="WebException"/>, and <see cref="SocketException"/> .
HttpExceptionSummaryProvider.cs (2)
75typeof(OperationCanceledException), 89case OperationCanceledException ex:
Microsoft.Extensions.Diagnostics.HealthChecks (5)
DefaultHealthCheckService.cs (2)
121catch (OperationCanceledException ex) when (!cancellationToken.IsCancellationRequested) 136catch (Exception ex) when (ex as OperationCanceledException == null)
HealthCheckPublisherHostedService.cs (3)
162catch (OperationCanceledException) when (IsStopping) 215catch (OperationCanceledException) when (IsStopping) 220catch (OperationCanceledException)
Microsoft.Extensions.Diagnostics.Testing.Tests (2)
Metrics\MetricCollectorTests.cs (2)
291await Assert.ThrowsAnyAsync<OperationCanceledException>(() => wait); 341await Assert.ThrowsAnyAsync<OperationCanceledException>(() => collector.WaitForMeasurementsAsync(1, TimeSpan.FromMilliseconds(50)));
Microsoft.Extensions.Hosting (1)
Internal\Host.cs (1)
191if (_applicationLifetime.ApplicationStopping.IsCancellationRequested && backgroundTask.IsCanceled && ex is OperationCanceledException)
Microsoft.Extensions.Http.Diagnostics (2)
Logging\Internal\HttpRequestBodyReader.cs (1)
80catch (OperationCanceledException) when (!cancellationToken.IsCancellationRequested)
Logging\Internal\HttpResponseBodyReader.cs (1)
85catch (OperationCanceledException) when (joinedTokenSource.IsCancellationRequested && !cancellationToken.IsCancellationRequested)
Microsoft.Extensions.Http.Diagnostics.Tests (6)
Logging\HttpClientLoggerTest.cs (1)
120var operationCanceledException = new OperationCanceledException();
Logging\HttpRequestBodyReaderTest.cs (1)
178streamMock.Setup(x => x.ReadAsync(It.IsAny<Memory<byte>>(), It.IsAny<CancellationToken>())).Throws<OperationCanceledException>();
Logging\HttpResponseBodyReaderTest.cs (4)
201await act.Should().ThrowAsync<OperationCanceledException>().Where(e => e.CancellationToken.IsCancellationRequested); 216streamMock.Setup(x => x.ReadAsync(It.IsAny<Memory<byte>>(), It.IsAny<CancellationToken>())).Throws<OperationCanceledException>(); 243var exception = new OperationCanceledException(token); 257await act.Should().ThrowAsync<OperationCanceledException>().Where(e => e.CancellationToken.IsCancellationRequested);
Microsoft.Extensions.Http.Polly.Tests (2)
PolicyHttpMessageHandlerTest.cs (2)
368var exception = await Assert.ThrowsAsync<OperationCanceledException>(async () =>
Microsoft.Extensions.Http.Resilience (1)
Polly\HttpClientResiliencePredicates.cs (1)
55&& outcome.Exception is OperationCanceledException { Source: "System.Private.CoreLib", InnerException: TimeoutException };
Microsoft.Extensions.ML (2)
ModelLoaders\FileModelLoader.cs (1)
85catch (OperationCanceledException)
ModelLoaders\UriModelLoader.cs (1)
91catch (OperationCanceledException) when (IsStopping)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Resolver\DnsResolver.cs (2)
474catch (OperationCanceledException) when ( 482catch (OperationCanceledException ex) when (cancellationToken.IsCancellationRequested && ex.CancellationToken != cancellationToken)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (4)
Resolver\CancellationTests.cs (4)
21var ex = await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await Resolver.ResolveIPAddressesAsync("example.com", AddressFamily.InterNetwork, cts.Token)); 31var task = Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await Resolver.ResolveIPAddressesAsync("example.com", AddressFamily.InterNetwork, cts.Token)); 39OperationCanceledException ex = await task;
Microsoft.Gen.Logging.Unit.Tests (1)
ParserTests.cs (1)
594await Assert.ThrowsAsync<OperationCanceledException>(async () =>
Microsoft.Gen.Metrics.Unit.Tests (1)
ParserTests.cs (1)
553await Assert.ThrowsAsync<OperationCanceledException>(async () =>
Microsoft.Gen.MetricsReports.Unit.Tests (1)
EmitterTests.cs (1)
84Assert.Throws<OperationCanceledException>(() =>
Microsoft.Maui.Controls (2)
StreamImageSource.cs (1)
46 catch (OperationCanceledException)
UriImageSource.cs (1)
68 catch (OperationCanceledException)
Microsoft.ML.AutoML (3)
AutoMLExperiment\AutoMLExperiment.cs (1)
318if (ex is not OperationCanceledException && ex is not OutOfMemoryException && _bestTrialResult == null)
Experiment\Experiment.cs (2)
194catch (OperationCanceledException e) 209if (e.InnerExceptions.All(exception => exception is OperationCanceledException))
Microsoft.ML.AutoML.Tests (1)
AutoFitTests.cs (1)
567if (ex is OperationCanceledException)
Microsoft.ML.Data (2)
DataLoadSave\Binary\BinaryLoader.cs (2)
1360catch (OperationCanceledException ex) 1984catch (OperationCanceledException ex)
Microsoft.ML.Sweeper (1)
AsyncSweeper.cs (1)
288catch (OperationCanceledException)
Microsoft.ML.Tests (3)
TrainerEstimators\TreeEstimators.cs (3)
1041action.Should().Throw<OperationCanceledException>(); 1095action.Should().Throw<OperationCanceledException>(); 1123action.Should().Throw<OperationCanceledException>();
Microsoft.ML.Vision (1)
ImageClassificationTrainer.cs (1)
1141catch (OperationCanceledException)
Microsoft.VisualStudio.IntegrationTest.Setup (1)
TestExtensionManager.cs (1)
26Debug.Assert(exception is not OperationCanceledException);
Microsoft.VisualStudio.LanguageServices (11)
CallHierarchy\Finders\AbstractCallFinder.cs (1)
70catch (OperationCanceledException)
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
209catch (OperationCanceledException)
KeybindingReset\KeybindingResetDetector.cs (1)
190catch (OperationCanceledException)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (1)
531catch (OperationCanceledException)
Library\ObjectBrowser\ObjectList.cs (1)
758catch (OperationCanceledException)
Packaging\PackageInstallerServiceFactory.cs (2)
344catch (OperationCanceledException) 405catch (OperationCanceledException)
Packaging\PackageInstallerServiceFactory_UndoRedo.cs (1)
108catch (OperationCanceledException)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (2)
352catch (OperationCanceledException) 396catch (OperationCanceledException)
Watson\FaultReporter.cs (1)
113if (exception is OperationCanceledException { InnerException: { } oceInnerException })
Microsoft.VisualStudio.LanguageServices.CSharp (1)
SemanticSearch\SemanticSearchQueryExecutor.cs (1)
106catch (OperationCanceledException)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
382[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OperationCanceledException))]
netstandard (1)
netstandard.cs (1)
1346[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OperationCanceledException))]
Replay (13)
src\Compilers\Shared\BuildServerConnection.cs (2)
352catch (OperationCanceledException) 425catch (Exception e) when (!(e is TaskCanceledException || e is OperationCanceledException))
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Roslyn.Diagnostics.Analyzers (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Roslyn.VisualStudio.DiagnosticsWindow (1)
OptionPages\ForceLowMemoryMode.cs (1)
142catch (OperationCanceledException)
Roslyn.VisualStudio.Next.UnitTests (5)
Services\ServiceHubServicesTests.cs (1)
182catch (OperationCanceledException)
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (3)
238await Assert.ThrowsAnyAsync<OperationCanceledException>( 303await Assert.ThrowsAnyAsync<OperationCanceledException>( 540await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await extensionMessageHandlerService.HandleExtensionDocumentMessageAsync(
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
138Assert.True(ex is OperationCanceledException, $"cancellationToken : {source.Token.IsCancellationRequested}/r/n{ex}");
SemanticSearch.BuildTask (11)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
Shared (1)
ServerSentEvents\SseParser_1.cs (1)
191/// <exception cref="OperationCanceledException">The enumeration was canceled. May propagate out of a call to <see cref="IAsyncEnumerator{T}.MoveNextAsync"/>.</exception>
Sockets.FunctionalTests (6)
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (5)
250await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await writeTcs.Task).DefaultTimeout(); 343await Assert.ThrowsAnyAsync<OperationCanceledException>(() => writeTcs.Task).DefaultTimeout(); 542catch (OperationCanceledException) 677catch (OperationCanceledException) 844await Assert.ThrowsAnyAsync<OperationCanceledException>(() => copyToAsyncCts.Task).DefaultTimeout();
src\Servers\Kestrel\test\FunctionalTests\UnixDomainSocketsTests.cs (1)
68catch (OperationCanceledException)
System.Collections.Concurrent (28)
System\Collections\Concurrent\BlockingCollection.cs (28)
263/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 268/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 355/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 364/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 389/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 422catch (OperationCanceledException) 523/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is 606/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 615/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 633/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 643/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 672catch (OperationCanceledException) 776/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 783/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 898/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 908/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 928/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 938/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 1144/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 1154/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 1263/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 1273/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 1295/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 1306/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 1329/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="CancellationToken"/> is 1340/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception> 1605/// throw an <see cref="System.OperationCanceledException"/> if the <see cref="CancellationToken"/> is canceled. 1611/// <exception cref="OperationCanceledException">If the <see cref="CancellationToken"/> is canceled.</exception>
System.Diagnostics.Process (1)
System\Diagnostics\AsyncStreamReader.cs (1)
114catch (OperationCanceledException)
System.IO.Compression.ZipFile (21)
System\IO\Compression\ZipFile.Create.Async.cs (9)
30/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 58/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 97/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 210/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 254/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 302/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 361/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 390/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 420/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception>
System\IO\Compression\ZipFile.Extract.Async.cs (8)
38/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 72/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 107/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 163/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 230/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 261/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 300/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 340/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception>
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Async.cs (2)
38/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception> 70/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception>
System\IO\Compression\ZipFileExtensions.ZipArchive.Extract.Async.cs (1)
33/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception>
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.Async.cs (1)
61/// <exception cref="OperationCanceledException">An asynchronous operation is cancelled.</exception>
System.IO.Pipelines (6)
System\IO\Pipelines\StreamPipeReader.cs (3)
285catch (OperationCanceledException ex) 372catch (OperationCanceledException) 433catch (OperationCanceledException)
System\IO\Pipelines\StreamPipeWriter.cs (1)
355catch (OperationCanceledException)
System\IO\Pipelines\ThrowHelper.cs (2)
75public static OperationCanceledException CreateOperationCanceledException_ReadCanceled() => new OperationCanceledException(SR.ReadCanceledOnPipeReader); 80public static OperationCanceledException CreateOperationCanceledException_FlushCanceled() => new OperationCanceledException(SR.FlushCanceledOnPipeWriter);
System.IO.Pipes (1)
System\IO\Pipes\NamedPipeServerStream.Unix.cs (1)
88catch (OperationCanceledException) when (!cancellationToken.IsCancellationRequested)
System.IO.Ports (3)
System\IO\Ports\SerialStream.Unix.cs (3)
433catch (OperationCanceledException) 570catch (OperationCanceledException) 591catch (OperationCanceledException)
System.Linq.Parallel (130)
System\Linq\Parallel\QueryOperators\Inlined\InlinedAggregationOperator.cs (1)
71if (ex is OperationCanceledException cancelEx
System\Linq\Parallel\Scheduling\QueryTaskGroupState.cs (2)
114OperationCanceledException? oce = flattenedAE.InnerExceptions[i] as OperationCanceledException;
System\Linq\Parallel\Scheduling\SpoolingTaskBase.cs (1)
51if (ex is OperationCanceledException oce &&
System\Linq\Parallel\Utils\ExceptionAggregator.cs (1)
146if (ex is OperationCanceledException cancelEx)
System\Linq\ParallelEnumerable.cs (125)
492/// <exception cref="System.OperationCanceledException"> 1608/// <exception cref="System.OperationCanceledException"> 1656/// <exception cref="System.OperationCanceledException"> 1696/// <exception cref="System.OperationCanceledException"> 1752/// <exception cref="System.OperationCanceledException"> 1805/// <exception cref="System.OperationCanceledException"> 1845/// <exception cref="System.OperationCanceledException"> 1887/// <exception cref="System.OperationCanceledException"> 1916/// <exception cref="System.OperationCanceledException"> 1954/// <exception cref="System.OperationCanceledException"> 1983/// <exception cref="System.OperationCanceledException"> 2006/// <exception cref="System.OperationCanceledException"> 2029/// <exception cref="System.OperationCanceledException"> 2052/// <exception cref="System.OperationCanceledException"> 2073/// <exception cref="System.OperationCanceledException"> 2094/// <exception cref="System.OperationCanceledException"> 2115/// <exception cref="System.OperationCanceledException"> 2136/// <exception cref="System.OperationCanceledException"> 2159/// <exception cref="System.OperationCanceledException"> 2182/// <exception cref="System.OperationCanceledException"> 2207/// <exception cref="System.OperationCanceledException"> 2231/// <exception cref="System.OperationCanceledException"> 2255/// <exception cref="System.OperationCanceledException"> 2279/// <exception cref="System.OperationCanceledException"> 2301/// <exception cref="System.OperationCanceledException"> 2323/// <exception cref="System.OperationCanceledException"> 2345/// <exception cref="System.OperationCanceledException"> 2367/// <exception cref="System.OperationCanceledException"> 2391/// <exception cref="System.OperationCanceledException"> 2415/// <exception cref="System.OperationCanceledException"> 2451/// <exception cref="System.OperationCanceledException"> 2472/// <exception cref="System.OperationCanceledException"> 2496/// <exception cref="System.OperationCanceledException"> 2517/// <exception cref="System.OperationCanceledException"> 2541/// <exception cref="System.OperationCanceledException"> 2562/// <exception cref="System.OperationCanceledException"> 2586/// <exception cref="System.OperationCanceledException"> 2607/// <exception cref="System.OperationCanceledException"> 2631/// <exception cref="System.OperationCanceledException"> 2652/// <exception cref="System.OperationCanceledException"> 2677/// <exception cref="System.OperationCanceledException"> 2704/// <exception cref="System.OperationCanceledException"> 2726/// <exception cref="System.OperationCanceledException"> 2751/// <exception cref="System.OperationCanceledException"> 2773/// <exception cref="System.OperationCanceledException"> 2798/// <exception cref="System.OperationCanceledException"> 2820/// <exception cref="System.OperationCanceledException"> 2845/// <exception cref="System.OperationCanceledException"> 2867/// <exception cref="System.OperationCanceledException"> 2892/// <exception cref="System.OperationCanceledException"> 2914/// <exception cref="System.OperationCanceledException"> 2940/// <exception cref="System.OperationCanceledException"> 2966/// <exception cref="System.OperationCanceledException"> 2987/// <exception cref="System.OperationCanceledException"> 3011/// <exception cref="System.OperationCanceledException"> 3032/// <exception cref="System.OperationCanceledException"> 3056/// <exception cref="System.OperationCanceledException"> 3077/// <exception cref="System.OperationCanceledException"> 3101/// <exception cref="System.OperationCanceledException"> 3122/// <exception cref="System.OperationCanceledException"> 3146/// <exception cref="System.OperationCanceledException"> 3167/// <exception cref="System.OperationCanceledException"> 3191/// <exception cref="System.OperationCanceledException"> 3218/// <exception cref="System.OperationCanceledException"> 3240/// <exception cref="System.OperationCanceledException"> 3265/// <exception cref="System.OperationCanceledException"> 3287/// <exception cref="System.OperationCanceledException"> 3312/// <exception cref="System.OperationCanceledException"> 3334/// <exception cref="System.OperationCanceledException"> 3359/// <exception cref="System.OperationCanceledException"> 3381/// <exception cref="System.OperationCanceledException"> 3406/// <exception cref="System.OperationCanceledException"> 3428/// <exception cref="System.OperationCanceledException"> 3454/// <exception cref="System.OperationCanceledException"> 3482/// <exception cref="System.OperationCanceledException"> 3505/// <exception cref="System.OperationCanceledException"> 3531/// <exception cref="System.OperationCanceledException"> 3554/// <exception cref="System.OperationCanceledException"> 3578/// <exception cref="System.OperationCanceledException"> 3599/// <exception cref="System.OperationCanceledException"> 3623/// <exception cref="System.OperationCanceledException"> 3644/// <exception cref="System.OperationCanceledException"> 3668/// <exception cref="System.OperationCanceledException"> 3689/// <exception cref="System.OperationCanceledException"> 3718/// <exception cref="System.OperationCanceledException"> 3742/// <exception cref="System.OperationCanceledException"> 3769/// <exception cref="System.OperationCanceledException"> 3793/// <exception cref="System.OperationCanceledException"> 3818/// <exception cref="System.OperationCanceledException"> 3840/// <exception cref="System.OperationCanceledException"> 3865/// <exception cref="System.OperationCanceledException"> 3887/// <exception cref="System.OperationCanceledException"> 3912/// <exception cref="System.OperationCanceledException"> 3934/// <exception cref="System.OperationCanceledException"> 3961/// <exception cref="System.OperationCanceledException"> 3984/// <exception cref="System.OperationCanceledException"> 4013/// <exception cref="System.OperationCanceledException"> 4044/// <exception cref="System.OperationCanceledException"> 4069/// <exception cref="System.OperationCanceledException"> 4318/// <exception cref="System.OperationCanceledException"> 4368/// <exception cref="System.OperationCanceledException"> 4813/// <exception cref="System.OperationCanceledException"> 4845/// <exception cref="System.OperationCanceledException"> 4926/// <exception cref="System.OperationCanceledException"> 4955/// <exception cref="System.OperationCanceledException"> 5017/// <exception cref="System.OperationCanceledException"> 5052/// <exception cref="System.OperationCanceledException"> 5109/// <exception cref="System.OperationCanceledException"> 5134/// <exception cref="System.OperationCanceledException"> 5188/// <exception cref="System.OperationCanceledException"> 5220/// <exception cref="System.OperationCanceledException"> 5392/// <exception cref="System.OperationCanceledException"> 5435/// <exception cref="System.OperationCanceledException"> 5474/// <exception cref="System.OperationCanceledException"> 5520/// <exception cref="System.OperationCanceledException"> 5568/// <exception cref="System.OperationCanceledException"> 5611/// <exception cref="System.OperationCanceledException"> 5652/// <exception cref="System.OperationCanceledException"> 5694/// <exception cref="System.OperationCanceledException"> 5742/// <exception cref="System.OperationCanceledException"> 5771/// <exception cref="System.OperationCanceledException"> 5798/// <exception cref="System.OperationCanceledException"> 5828/// <exception cref="System.OperationCanceledException"> 5903/// <exception cref="System.OperationCanceledException"> 5943/// <exception cref="System.OperationCanceledException">
System.Net.Http (26)
src\libraries\Common\src\System\Threading\Tasks\TaskCompletionSourceWithCancellation.cs (1)
8/// <seealso cref="OperationCanceledException"/>s contain the relevant <see cref="CancellationToken"/>,
System\Net\Http\CancellationHelper.cs (2)
12/// <summary>The default message used by <see cref="OperationCanceledException"/>.</summary> 20!(exception is OperationCanceledException) && cancellationToken.IsCancellationRequested;
System\Net\Http\DiagnosticsHandler.cs (1)
168catch (OperationCanceledException ex)
System\Net\Http\HttpClient.cs (1)
583if (e is OperationCanceledException oce)
System\Net\Http\HttpContent.cs (2)
449/// <exception cref="OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception> 464/// <exception cref="OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
System\Net\Http\MessageProcessingHandler.cs (3)
89catch (OperationCanceledException e) 105catch (OperationCanceledException e) 118TaskCompletionSource<HttpResponseMessage> tcs, OperationCanceledException e)
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (2)
82if (e is OperationCanceledException) 133catch (Exception ex) when (ex is not OperationCanceledException)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (4)
700throw ex is OperationCanceledException oce && oce.CancellationToken == cancellationToken ? 746catch (OperationCanceledException oce) when (oce.CancellationToken == cancellationToken) 806catch (Exception e) when (e is not OperationCanceledException) 841private static Exception CreateConnectTimeoutException(OperationCanceledException oce)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (1)
269connectionException = e is OperationCanceledException oce && oce.CancellationToken == cts.Token && !waiter.CancelledByOriginatingRequestCompletion ?
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (3)
221connectionException = e is OperationCanceledException oce && oce.CancellationToken == cts.Token && !waiter.CancelledByOriginatingRequestCompletion ? 258if (e is OperationCanceledException oce && oce.CancellationToken == cancellationToken) 349catch (OperationCanceledException oce) when (oce.CancellationToken == cancellationToken)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (2)
285connectionException = e is OperationCanceledException oce && oce.CancellationToken == cts.Token && !waiter.CancelledByOriginatingRequestCompletion ? 315if (connectionException is not null && connectionException is not OperationCanceledException && authority is not null)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
251if (e is OperationCanceledException oce && oce.CancellationToken == cancellationToken)
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (1)
1332catch (OperationCanceledException e) when (e.CancellationToken == _requestBodyCancellationSource.Token)
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (2)
345catch (OperationCanceledException ex) when (ex.CancellationToken == _requestBodyCancellationSource.Token || ex.CancellationToken == cancellationToken) 1382case OperationCanceledException oce when oce.CancellationToken == cancellationToken:
System.Net.Http.Json (1)
System\Net\Http\Json\HttpClientJsonExtensions.cs (1)
93catch (OperationCanceledException oce) when ((linkedCTS?.Token.IsCancellationRequested == true) && !cancellationToken.IsCancellationRequested)
System.Net.Mail (2)
System\Net\Mail\SmtpClient.cs (2)
549canceled = e is OperationCanceledException; 561e is OperationCanceledException)
System.Net.NameResolution (1)
System\Net\Dns.cs (1)
139else if (ex is OperationCanceledException)
System.Net.Ping (3)
System\Net\NetworkInformation\Ping.cs (1)
727catch (Exception e) when (e is not PlatformNotSupportedException && !(e is OperationCanceledException && _canceled))
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
89catch (OperationCanceledException) when (timeoutOrCancellationToken.IsCancellationRequested)
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
373catch (OperationCanceledException) when (!_canceled)
System.Net.Quic (5)
System\Net\Quic\QuicConnection.cs (1)
87catch (OperationCanceledException)
System\Net\Quic\QuicListener.cs (2)
252catch (OperationCanceledException) when (_disposeCts.IsCancellationRequested) 265catch (OperationCanceledException oce) when (cancellationToken.IsCancellationRequested && !connection.ConnectionShutdownToken.IsCancellationRequested)
System\Net\Quic\QuicStream.Stream.cs (2)
130catch (OperationCanceledException) when (cts?.IsCancellationRequested == true) 189catch (OperationCanceledException) when (cts?.IsCancellationRequested == true)
System.Net.Security (4)
System\Net\Security\NegotiateStream.cs (2)
438catch (Exception e) when (!(e is IOException || e is OperationCanceledException)) 552catch (Exception e) when (!(e is IOException || e is OperationCanceledException))
System\Net\Security\SslStream.IO.cs (2)
945if (e is IOException || (e is OperationCanceledException && cancellationToken.IsCancellationRequested)) 984if (e is IOException || (e is OperationCanceledException && cancellationToken.IsCancellationRequested))
System.Net.ServerSentEvents (1)
System\Net\ServerSentEvents\SseParser_1.cs (1)
175/// <exception cref="OperationCanceledException">The enumeration was canceled. Such an exception may propagate out of a call to <see cref="IAsyncEnumerator{T}.MoveNextAsync"/>.</exception>
System.Net.Sockets (5)
System\Net\Sockets\Socket.cs (1)
4067OperationCanceledException => SocketError.OperationAborted,
System\Net\Sockets\Socket.Tasks.cs (1)
212catch (Exception ex) when (CanProceedWithMultiConnect && ex is not OperationCanceledException)
System\Net\Sockets\SocketAsyncEventArgs.cs (2)
456else if (exception is OperationCanceledException) 836caughtException is OperationCanceledException ||
System\Net\Sockets\SocketPal.Unix.cs (1)
2148exc is OperationCanceledException ? SocketError.OperationAborted :
System.Net.WebSockets (6)
System\Net\WebSockets\ManagedWebSocket.cs (6)
535exc is OperationCanceledException ? exc : 571if (exc is OperationCanceledException) 611if (exc is OperationCanceledException) 1001if (exc is OperationCanceledException) 1470catch (OperationCanceledException) 1715private static OperationCanceledException CreateOperationCanceledException(Exception innerException, CancellationToken cancellationToken = default(CancellationToken))
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
217(exc is OperationCanceledException && cancellationToken.IsCancellationRequested))
System.Private.CoreLib (61)
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (7)
829/// <exception cref="OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception> 847/// <exception cref="OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception> 1140/// <exception cref="OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception> 1156/// <exception cref="OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception> 1276/// <exception cref="OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception> 1380/// <exception cref="OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception> 1395/// <exception cref="OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (4)
380catch (OperationCanceledException oce) 416catch (OperationCanceledException oce) 675catch (OperationCanceledException oce) 706catch (OperationCanceledException oce)
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (2)
435Debug.Assert(ex is not OperationCanceledException); 712Debug.Assert(ex is not OperationCanceledException);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (1)
520bool successfullySet = exception is OperationCanceledException oce ?
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationToken.cs (2)
348/// Throws a <see cref="OperationCanceledException">OperationCanceledException</see> if 358/// <exception cref="OperationCanceledException">The token has had cancellation requested.</exception>
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (4)
271/// <exception cref="OperationCanceledException">The object has been canceled.</exception> 370/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was 427/// <exception cref="OperationCanceledException"><paramref 482/// <exception cref="OperationCanceledException"><paramref
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (5)
190/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was 249/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was canceled.</exception> 298/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was canceled.</exception> 379OperationCanceledException? oce = null; 394catch (OperationCanceledException e) { oce = e; }
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (3)
500OperationCanceledException? oce = null; 514catch (OperationCanceledException _oce) { oce = _oce; } 1308catch (OperationCanceledException oce)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
90_error.SourceException is OperationCanceledException ? ValueTaskSourceStatus.Canceled :
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (23)
1301/// <see cref="OperationCanceledException">OperationCanceledException</see> that bears the same 1751var eoAsOce = exceptionObject as OperationCanceledException; 1756(eoAsEdi != null && eoAsEdi.SourceException is OperationCanceledException), 2417if (unhandledException is OperationCanceledException exceptionAsOce && IsCancellationRequested && 2675/// <exception cref="OperationCanceledException"> 2696/// <exception cref="OperationCanceledException"> 2751/// <exception cref="OperationCanceledException"> 3137/// <exception cref="OperationCanceledException">The wait was canceled.</exception> 3276var oce = cancellationException as OperationCanceledException; 3281oce = edi.SourceException as OperationCanceledException; 3412cancellationException is OperationCanceledException || 3413(cancellationException as ExceptionDispatchInfo)?.SourceException is OperationCanceledException, 4850/// <exception cref="OperationCanceledException"> 4899/// <exception cref="OperationCanceledException"> 4923/// <exception cref="OperationCanceledException">The <paramref name="cancellationToken"/> was canceled.</exception> 4926/// contains an <see cref="OperationCanceledException"/> in its <see cref="AggregateException.InnerExceptions"/> collection. 5244/// <exception cref="OperationCanceledException"> 5310/// <exception cref="OperationCanceledException"> 5489internal static Task FromCanceled(OperationCanceledException exception) 5503internal static Task<TResult> FromCanceled<TResult>(OperationCanceledException exception) 7518oceEdi.SourceException is OperationCanceledException oce)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (3)
122if (exceptionObject is OperationCanceledException oce) 129Debug.Assert(edi != null && edi.SourceException is OperationCanceledException, 300Debug.Assert(edi == null || edi.SourceException is OperationCanceledException,
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (4)
211if (exc is OperationCanceledException oce) 265if (exc is OperationCanceledException oce) 619if (exc is OperationCanceledException oce) 672if (exc is OperationCanceledException oce)
src\System\Runtime\ControlledExecution.CoreCLR.cs (2)
29/// <exception cref="OperationCanceledException">The execution was aborted.</exception> 101OperationCanceledException e = cancellationToken.IsCancellationRequested ? new(cancellationToken) : new();
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
409[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OperationCanceledException))]
System.Security.Cryptography (21)
System\Security\Cryptography\CryptographicOperations.cs (5)
305/// <exception cref="OperationCanceledException"> 354/// <exception cref="OperationCanceledException"> 651/// <exception cref="OperationCanceledException"> 696/// <exception cref="OperationCanceledException"> 743/// <exception cref="OperationCanceledException">
System\Security\Cryptography\Kmac128.cs (3)
410/// <exception cref="OperationCanceledException"> 457/// <exception cref="OperationCanceledException"> 498/// <exception cref="OperationCanceledException">
System\Security\Cryptography\Kmac256.cs (3)
410/// <exception cref="OperationCanceledException"> 457/// <exception cref="OperationCanceledException"> 498/// <exception cref="OperationCanceledException">
System\Security\Cryptography\KmacXof128.cs (3)
410/// <exception cref="OperationCanceledException"> 457/// <exception cref="OperationCanceledException"> 498/// <exception cref="OperationCanceledException">
System\Security\Cryptography\KmacXof256.cs (3)
410/// <exception cref="OperationCanceledException"> 457/// <exception cref="OperationCanceledException"> 498/// <exception cref="OperationCanceledException">
System\Security\Cryptography\Shake128.cs (2)
408/// <exception cref="OperationCanceledException"> 449/// <exception cref="OperationCanceledException">
System\Security\Cryptography\Shake256.cs (2)
408/// <exception cref="OperationCanceledException"> 449/// <exception cref="OperationCanceledException">
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\StreamedFramingRequestChannel.cs (1)
270catch (OperationCanceledException)
System.ServiceModel.NetNamedPipe (2)
System\ServiceModel\Channels\PipeConnection.cs (2)
146catch (OperationCanceledException) 181catch(OperationCanceledException)
System.Threading (8)
System\Threading\Barrier.cs (4)
497/// <exception cref="System.OperationCanceledException"><paramref name="cancellationToken"/> has been 559/// <exception cref="System.OperationCanceledException"><paramref name="cancellationToken"/> has been 618/// <exception cref="System.OperationCanceledException"><paramref name="cancellationToken"/> has been 697catch (OperationCanceledException)
System\Threading\CountdownEvent.cs (4)
425/// is canceled during the wait operation, an <see cref="System.OperationCanceledException"/> 428/// <exception cref="System.OperationCanceledException"><paramref name="cancellationToken"/> has been 483/// <exception cref="System.OperationCanceledException"><paramref name="cancellationToken"/> has 532/// <exception cref="System.OperationCanceledException"><paramref name="cancellationToken"/> has
System.Threading.Channels (5)
System\Threading\Channels\AsyncOperation.cs (1)
440_error.SourceException is OperationCanceledException ? ValueTaskSourceStatus.Canceled :
System\Threading\Channels\ChannelReader.cs (1)
72catch (Exception exc) when (exc is not (ChannelClosedException or OperationCanceledException))
System\Threading\Channels\ChannelUtilities.cs (3)
32if (error is OperationCanceledException oce) 63error is OperationCanceledException oce ? Task.FromCanceled<T>(oce.CancellationToken.IsCancellationRequested ? oce.CancellationToken : new CancellationToken(true)) : 362inner is OperationCanceledException ? inner :
System.Threading.Tasks (1)
System.Threading.Tasks.cs (1)
5[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OperationCanceledException))]
System.Threading.Tasks.Dataflow (3)
Base\DataflowBlock.cs (2)
876/// <exception cref="System.OperationCanceledException">The operation was canceled before an item was received from the source.</exception> 920/// <exception cref="System.OperationCanceledException">The operation was canceled before an item was received from the source.</exception>
Internal\Common.cs (1)
153return exception is OperationCanceledException;
System.Threading.Tasks.Parallel (26)
System\Threading\Tasks\Parallel.cs (26)
100/// <see cref="System.OperationCanceledException"/>. 175/// <exception cref="System.OperationCanceledException">The exception that is thrown when 435/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 472/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 585/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 624/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 779/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 844/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 955OperationCanceledException? oce = null; 1206/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 1276/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 1348/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 1452/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 1571/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 2132/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 2196/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 2262/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 2345/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 2433/// <exception cref="System.OperationCanceledException">The exception that is thrown when the 2554OperationCanceledException? oce = null; 2806private static OperationCanceledException? ReduceToSingleCancellationException(ICollection exceptions, 2827OperationCanceledException? ocEx = ex as OperationCanceledException; 2833Debug.Assert(first is OperationCanceledException); 2834return (OperationCanceledException)first; 2847OperationCanceledException? reducedCancelEx = ReduceToSingleCancellationException(exceptions, cancelToken);
System.Windows.Forms.Primitives.TestUtilities (4)
Extensions\AssertExtensions.cs (4)
258OperationCanceledException oce = Assert.ThrowsAny<OperationCanceledException>(testCode); 273OperationCanceledException oce = await Assert.ThrowsAnyAsync<OperationCanceledException>(testCode);
Templates.Blazor.Tests (2)
BlazorWasmTemplateTest.cs (1)
202catch (OperationCanceledException)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
235catch (OperationCanceledException)
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
235catch (OperationCanceledException)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
167catch (OperationCanceledException)
Templates.Blazor.WebAssembly.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
235catch (OperationCanceledException)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
167catch (OperationCanceledException)
Templates.Mvc.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
235catch (OperationCanceledException)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
167catch (OperationCanceledException)
Templates.Tests (2)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
235catch (OperationCanceledException)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
167catch (OperationCanceledException)
Test.Utilities (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
Text.Analyzers (16)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (8)
116if (exception is OperationCanceledException) 129/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 132/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 135/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match 191if (exception is OperationCanceledException) 204/// <para>Cancellable operations are only expected to throw <see cref="OperationCanceledException"/> if the 207/// <see cref="OperationCanceledException"/> which occurs without <paramref name="contextCancellationToken"/> 210/// <para>This method does not require <see cref="OperationCanceledException.CancellationToken"/> to match
src\Dependencies\Contracts\ExceptionUtilities.cs (3)
34/// Determine if an exception was an <see cref="OperationCanceledException"/>, and that the provided token caused the cancellation. 38/// <returns><see langword="true"/> if the exception was an <see cref="OperationCanceledException" /> and the token was canceled.</returns> 40=> exception is OperationCanceledException && cancellationToken.IsCancellationRequested;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
28/// <exception cref="OperationCanceledException">The delay has been canceled.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
269catch (OperationCanceledException) 437catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
79/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> was
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
100/// <see cref="OperationCanceledException"/> in the case where the asynchronous operation is cancelled.
vbc (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
352catch (OperationCanceledException) 425catch (Exception e) when (!(e is TaskCanceledException || e is OperationCanceledException))
VBCSCompiler (4)
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (1)
211catch (OperationCanceledException)
src\Compilers\Server\VBCSCompiler\ServerDispatcher.cs (1)
199catch (OperationCanceledException)
src\Compilers\Shared\BuildServerConnection.cs (2)
352catch (OperationCanceledException) 425catch (Exception e) when (!(e is TaskCanceledException || e is OperationCanceledException))
VBCSCompiler.UnitTests (1)
BuildClientTests.cs (1)
153await Assert.ThrowsAnyAsync<OperationCanceledException>(