28 references to OperationCanceledException
Aspire.Dashboard (1)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (1)
188throw new OperationCanceledException("Read call was canceled.");
Aspire.Hosting (2)
ApplicationModel\ResourceNotificationService.cs (2)
139throw new OperationCanceledException($"The operation was cancelled before the resource reached one of the target states: [{string.Join(", ", targetStates)}]"); 430throw 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 (1)
Commands\BaseCommand.cs (1)
337throw new OperationCanceledException("Failed to connect, retry limit exceeded.");
Microsoft.AspNetCore.Connections.Abstractions (1)
Exceptions\ConnectionAbortedException.cs (1)
25public ConnectionAbortedException(string message) : base(message)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Common\RetryHelper.cs (1)
66throw new OperationCanceledException("Failed to connect, retry limit exceeded.");
Microsoft.AspNetCore.Server.Kestrel.Core (2)
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.");
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1923CompleteClose(new OperationCanceledException(message));
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HttpConnectionTests.ConnectionLifecycle.cs (1)
495throw new OperationCanceledException("Cancel SSE Start.");
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 (1)
RequestLifetimeFeature.cs (1)
28_abort(new OperationCanceledException("The application aborted the request."));
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
34public SoftCrashException(string message) : base(message) { }
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
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.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.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SoftCrashException.cs (1)
34public SoftCrashException(string message) : base(message) { }
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
DefaultHealthCheckServiceTest.cs (1)
130b.AddAsyncCheck("OperationExceptionCheck", _ => throw new OperationCanceledException(OperationCancelledMessage), operationExceptionTags);
Microsoft.ML.Core (1)
Utilities\Contracts.cs (1)
753throw Process(new OperationCanceledException("Operation was canceled."), env);
System.IO.Pipelines (2)
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.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\OperationCanceledException.cs (1)
53: this(message)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCanceledException.cs (2)
31public TaskCanceledException() : base(SR.TaskCanceledException_ctor_DefaultMessage) 40public TaskCanceledException(string? message) : base(message ?? SR.TaskCanceledException_ctor_DefaultMessage)
System.Text.Json (1)
System\Text\Json\ThrowHelper.Serialization.cs (1)
939throw new OperationCanceledException(SR.PipeWriterCanceled);