96 references to IsCanceled
Aspire.Dashboard (1)
src\Shared\TaskHelpers.cs (1)
22if (task is null || task.IsCompletedSuccessfully || task.IsCanceled)
Aspire.Hosting (3)
Publishing\ContainerRuntimeResolver.cs (2)
48if (task is not null && !task.IsCanceled) 56if (task is not null && !task.IsCanceled)
src\Shared\TaskHelpers.cs (1)
22if (task is null || task.IsCompletedSuccessfully || task.IsCanceled)
Aspire.Hosting.Azure (2)
AzureProvisioningController.cs (2)
1074resource.AzureResource.ProvisioningTaskCompletionSource?.Task is { IsFaulted: true } or { IsCanceled: true }); 1099.Where(static resource => resource.AzureResource.ProvisioningTaskCompletionSource?.Task is { IsFaulted: true } or { IsCanceled: true })
Aspire.Hosting.Azure.Tests (1)
AzureEnvironmentResourceExtensionsTests.cs (1)
5145if (operationTask.IsFaulted || operationTask.IsCanceled)
Aspire.Hosting.Tests (4)
Health\ResourceHealthCheckServiceTests.cs (3)
385while (!pendingStart.IsCanceled) 431while (!pendingStart.IsCanceled) 492while (!pendingStart.IsCanceled)
Publishing\ContainerRuntimeResolverTests.cs (1)
85if (firstTask is { IsCanceled: true })
CatalogDb (1)
CatalogDbInitializerHealthCheck.cs (1)
15{ IsCanceled: true } => Task.FromResult(HealthCheckResult.Unhealthy("Database initialization was canceled")),
dotnet-svcutil-lib (5)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (2)
61else if (antecedent.IsCanceled) tcsObj.TrySetCanceled(); 111else if (antecedent.IsCanceled)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketHelper.cs (2)
195if (task.IsCanceled) 208if (task.IsCanceled)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
110if (task.IsCanceled)
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
573if (task.IsCanceled || _cancellationToken.IsCancellationRequested)
Microsoft.AspNetCore.Components (5)
ComponentBase.cs (2)
301if (!task.IsCanceled) 344if (task.IsCanceled)
RenderTree\Renderer.cs (3)
915if (updateDisplayTask.IsCanceled) 971if (updateDisplayTask.IsCanceled) 1162if (!taskToHandle.IsCanceled)
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
184if (!taskToHandle.IsCanceled)
Microsoft.AspNetCore.Components.WebAssembly (2)
Rendering\WebAssemblyDispatcher.cs (2)
104else if (t.IsCanceled) 148else if (t.IsCanceled)
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\KeyRingProvider.cs (1)
476Debug.Assert(!task.IsCanceled, "How did a task with no cancellation token get canceled?");
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
444else if (resultTask.IsFaulted || resultTask.IsCanceled)
Microsoft.AspNetCore.Owin (1)
WebSockets\OwinWebSocketAcceptAdapter.cs (1)
84if (task.IsCanceled)
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
894if (writeTask.IsFaulted || writeTask.IsCanceled || !writeTask.IsCompleted)
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
714else if (!WhenInitializedTask.IsCanceled)
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (1)
728Debug.Assert(!driver.WhenInitializedTask.IsCanceled);
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
573if (task.IsCanceled || _cancellationToken.IsCancellationRequested)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
573if (task.IsCanceled || _cancellationToken.IsCancellationRequested)
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
573if (task.IsCanceled || _cancellationToken.IsCancellationRequested)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
573if (task.IsCanceled || _cancellationToken.IsCancellationRequested)
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
573if (task.IsCanceled || _cancellationToken.IsCancellationRequested)
Microsoft.Diagnostics.NETCore.Client (1)
DiagnosticsServerRouter\DiagnosticsServerRouterRunner.cs (1)
95if (routerTask.IsFaulted || routerTask.IsCanceled)
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\DistributedCachingChatClientTest.cs (2)
230Assert.True(result1.IsCanceled); 539Assert.True(result1Assertion.IsCanceled);
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (1)
234Assert.True(result1.IsCanceled);
Microsoft.Extensions.Hosting (2)
Internal\Host.cs (2)
287if (_applicationLifetime.ApplicationStopping.IsCancellationRequested && backgroundTask.IsCanceled && ex is OperationCanceledException) 470else if (task.IsCanceled)
Microsoft.Extensions.TimeProvider.Testing.Tests (4)
FakeTimeProviderTests.cs (4)
309Assert.False(delay.IsCanceled); 385Assert.False(t.IsCanceled); 405Assert.False(t.IsCanceled); 423Assert.False(t.IsCanceled);
Microsoft.TemplateEngine.Edge (3)
TemplateConstraintManager.cs (3)
69if (constraint.Task.IsFaulted || constraint.Task.IsCanceled) 120if (task.IsFaulted || task.IsCanceled) 195if (task.IsFaulted || task.IsCanceled)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
BindSymbolEvaluator.cs (1)
92if (currentTask.IsFaulted || currentTask.IsCanceled)
NuGet.PackageManagement (1)
Resolution\ResolverGather.cs (1)
361if (task.IsCompleted || task.IsFaulted || task.IsCanceled)
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
573if (task.IsCanceled || _cancellationToken.IsCancellationRequested)
System.Data.Odbc (1)
Common\System\Data\ProviderBase\DbConnectionFactory.cs (1)
106if (task.IsCanceled)
System.Data.OleDb (1)
System\Data\ProviderBase\DbConnectionFactory.cs (1)
222if (task.IsCanceled)
System.Net.Http (5)
System\Net\Http\MessageProcessingHandler.cs (1)
72if (task.IsCanceled)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
865waiter.SetTimeoutToPendingConnectionAttempt(this, requestCancelled: waiter.Task.IsCanceled);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionWaiter.cs (1)
79connection.Trace(Task.IsCanceled
System\Net\Http\SocketsHttpHandler\ConnectionPool\RequestQueue.cs (1)
133pool.Trace(queueItem.Waiter.Task.IsCanceled
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1182return !Task.IsCanceled;
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
527var e = new PingCompletedEventArgs(t.IsCompletedSuccessfully ? t.Result : null, t.Exception, t.IsCanceled, asyncOp.UserSuppliedState);
System.Net.Requests (1)
System\Net\TaskExtensions.cs (1)
35Debug.Assert(tcs.Task.IsCanceled);
System.Net.Sockets (6)
System\Net\Sockets\Socket.cs (6)
2515if (t.IsFaulted || t.IsCanceled) 2541if (t.IsFaulted || t.IsCanceled) 2612if (t.IsFaulted || t.IsCanceled) 2637if (t.IsFaulted || t.IsCanceled) 4075Debug.Assert(t.IsCanceled || t.IsFaulted); 4077if (t.IsCanceled)
System.Private.CoreLib (18)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (10)
1982if (includeTaskCanceledExceptions && IsCanceled) 2024Debug.Assert(IsCanceled, "Must only be used when the task has canceled."); 2406if (!IsCancellationRequested & !IsCanceled) 2432if (!IsCancellationRequested & !IsCanceled) 2444if (!IsCanceled) 2935if (IsCanceled) cancellationToken.ThrowIfCancellationRequested(); 5171else if (task.IsCanceled) cancellationSeen = true; 5192else if (task.IsCanceled) cancellationSeen = true; 6344else if (task.IsCanceled) 6622else if (task.IsCanceled)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (2)
304(completedTask.IsCanceled ? 314if (TplEventSource.Log.IsEnabled() && !continuationTask.IsCanceled)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (2)
178task.IsCanceled || 194if (inlined && !(task.IsDelegateInvoked || task.IsCanceled))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (4)
373/// value of the task's <see cref="Task.IsCanceled"/> property. 389return t.IsCanceled; 783/// value of the task's <see cref="Task.IsCanceled"/> property. 799return t.IsCanceled;
System.ServiceModel.Federation (2)
System\Runtime\TaskHelpers.cs (2)
50else if (antecedent.IsCanceled) 106else if (antecedent.IsCanceled)
System.ServiceModel.Http (2)
System\ServiceModel\Channels\WebSocketHelper.cs (2)
194if (task.IsCanceled) 207if (task.IsCanceled)
System.ServiceModel.Primitives (3)
Internals\System\Runtime\TaskHelpers.cs (2)
65else if (antecedent.IsCanceled) 121else if (antecedent.IsCanceled)
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
105if (task.IsCanceled)
System.ServiceModel.Primitives.Tests (1)
ServiceModel\ThrowingOnCloseBindingElement.cs (1)
167else if (task.IsCanceled)
System.Threading.Tasks.Dataflow (2)
Base\DataflowBlock.cs (1)
955if (task.IsCanceled) cancellationToken.ThrowIfCancellationRequested();
Internal\Common.cs (1)
377Debug.Assert(t.IsCanceled, "Task's constructor should cancel the task synchronously in the ctor.");