139 references to IsFaulted
aspire (6)
Backchannel\AppHostCliBackchannel.cs (1)
311if (_rpcTaskCompletionSource.Task.IsCompleted && !_rpcTaskCompletionSource.Task.IsFaulted)
Commands\PipelineCommandBase.cs (3)
304if (completedTask.IsFaulted && completedTask.Exception?.InnerException is DotNetSdkNotInstalledException sdkException) 313if (!completedTask.IsFaulted && await pendingRun == CliExitCodes.Success 321var innerException = completedTask.IsFaulted ? completedTask.Exception : null;
Projects\GuestAppHostProject.cs (1)
569if (t.IsFaulted)
Tui\TerminalViewerApp.cs (1)
219if (t.IsFaulted)
Aspire.Cli.Tests (1)
Projects\GuestAppHostProjectTests.cs (1)
1130Assert.True(backchannelCompletionSource.Task.IsFaulted, "The configured immediate timeout should fault the guest backchannel wait before test cancellation.");
Aspire.Hosting (4)
Orchestrator\ApplicationOrchestrator.cs (1)
181if (completedTask.IsFaulted)
Pipelines\DistributedApplicationPipeline.cs (3)
881.Where(depName => stepCompletions.ContainsKey(depName) && stepCompletions[depName].Task.IsFaulted) 957.Where(t => t.IsFaulted) 968if (allStepTasks[i].IsFaulted)
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 (2)
Orchestrator\ParameterProcessorTests.cs (2)
138Assert.True(parameterWithMissingValue.WaitForValueTcs.Task.IsFaulted); 171Assert.True(parameterWithError.WaitForValueTcs.Task.IsFaulted);
Aspire.TerminalHost (1)
TerminalHostApp.cs (1)
146if (replicaRun.IsFaulted)
CatalogDb (1)
CatalogDbInitializerHealthCheck.cs (1)
14{ IsFaulted: true } => Task.FromResult(HealthCheckResult.Unhealthy(task.Exception?.InnerException?.Message, task.Exception)),
dotnet (1)
Commands\BuildServer\Shutdown\BuildServerShutdownCommand.cs (1)
67if (task.IsFaulted)
dotnet-svcutil-lib (6)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (2)
60if (antecedent.IsFaulted) tcsObj.TrySetException(antecedent.Exception.InnerException); 107if (antecedent.IsFaulted)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketHelper.cs (2)
191if (task.IsFaulted) 204if (task.IsFaulted)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (2)
81if (invokeTask.IsFaulted) 92if (task.IsFaulted)
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
577else if (task.IsFaulted)
Microsoft.AspNetCore.Components (3)
ErrorBoundaryBase.cs (1)
95if (onExceptionTask.IsFaulted)
NavigationManager.cs (1)
493if (completedHandlerTask.IsFaulted)
RenderTree\Renderer.cs (1)
925if (updateDisplayTask.IsFaulted)
Microsoft.AspNetCore.Components.Web (1)
HtmlRendering\StaticHtmlRenderer.cs (1)
72if (quiescenceTask.IsFaulted)
Microsoft.AspNetCore.Components.WebAssembly (2)
Rendering\WebAssemblyDispatcher.cs (2)
100if (t.IsFaulted) 144if (t.IsFaulted)
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
444else if (resultTask.IsFaulted || resultTask.IsCanceled)
Microsoft.AspNetCore.Http.Connections.Client (2)
Internal\LongPollingTransport.cs (1)
98_error = sending.IsFaulted ? sending.Exception!.InnerException : null;
Internal\ServerSentEventsTransport.cs (1)
115_error = sending.IsFaulted ? sending.Exception!.InnerException : null;
Microsoft.AspNetCore.Owin (1)
WebSockets\OwinWebSocketAcceptAdapter.cs (1)
88else if (task.IsFaulted)
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
894if (writeTask.IsFaulted || writeTask.IsCanceled || !writeTask.IsCompleted)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\aspnetcore\src\SignalR\common\testassets\Tests.Utils\TaskExtensions.cs (1)
15if (completed == otherTask && otherTask.IsFaulted)
Microsoft.CodeAnalysis (3)
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
710if (WhenInitializedTask.IsFaulted) 728Debug.Assert(faultedTask.IsFaulted); 881if (this.WhenCompletedTask.IsFaulted)
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
577else if (task.IsFaulted)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
577else if (task.IsFaulted)
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
577else if (task.IsFaulted)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
577else if (task.IsFaulted)
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
577else if (task.IsFaulted)
Microsoft.Diagnostics.NETCore.Client (9)
DiagnosticsServerRouter\DiagnosticsServerRouterFactory.cs (7)
833if (checkIpcStreamTask.IsFaulted) 870if (checkTcpStreamTask.IsFaulted) 1016if (checkIpcStreamTask.IsFaulted) 1150if (checkTcpStreamTask.IsFaulted) 1295if (checkTcpStreamTask.IsFaulted) 1369if (readTask.IsFaulted) 1374if (checkTcpStreamTask.IsFaulted)
DiagnosticsServerRouter\DiagnosticsServerRouterRunner.cs (1)
95if (routerTask.IsFaulted || routerTask.IsCanceled)
ReversedServer\ReversedDiagnosticsServer.cs (1)
176if (_acceptTransportTask.IsFaulted)
Microsoft.Extensions.Diagnostics.Testing.Tests (3)
Metrics\MetricCollectorTests.cs (3)
260Assert.False(wait.IsFaulted); 267Assert.False(wait.IsFaulted); 374Assert.True(wait.IsFaulted);
Microsoft.Extensions.Hosting (1)
Internal\Host.cs (1)
493if (groupedTasks.IsFaulted)
Microsoft.Extensions.TimeProvider.Testing.Tests (5)
FakeTimeProviderTests.cs (5)
295Assert.True(t.IsCompleted && !t.IsFaulted); 308Assert.False(delay.IsFaulted); 384Assert.False(t.IsFaulted); 404Assert.False(t.IsFaulted); 422Assert.True(t.IsFaulted);
Microsoft.Maui.Controls (1)
NavigationPage\NavigationPage.cs (1)
411 if (t.IsFaulted)
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 (2)
BindSymbolEvaluator.cs (2)
92if (currentTask.IsFaulted || currentTask.IsCanceled) 242foreach (var task in tasksToRun.Where(t => t.Task.IsFaulted))
Microsoft.TestPlatform.CommunicationUtilities (1)
SocketClient.cs (1)
94if (connectAsyncTask.IsFaulted)
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)
577else if (task.IsFaulted)
System.Data.Odbc (1)
Common\System\Data\ProviderBase\DbConnectionFactory.cs (1)
110else if (task.IsFaulted)
System.Data.OleDb (1)
System\Data\ProviderBase\DbConnectionFactory.cs (1)
226else if (task.IsFaulted)
System.Net.Http (4)
System\Net\Http\MessageProcessingHandler.cs (1)
66if (task.IsFaulted)
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (1)
155if (closeTask.IsFaulted && NetEventSource.Log.IsEnabled())
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (2)
317if (task.IsFaulted) 330Debug.Assert(task.IsFaulted);
System.Net.Security (3)
System\Net\Security\SslStreamCertificateContext.Linux.cs (3)
203if (pending is not null && !pending.IsFaulted) 215if (pending is not null && !pending.IsFaulted) 256if (pending is null || pending.IsFaulted)
System.Net.Sockets (5)
System\Net\Sockets\Socket.cs (5)
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);
System.Net.WebSockets (2)
System\Net\WebSockets\ManagedWebSocket.cs (2)
1892if (t.IsFaulted) 1909Debug.Assert(task.IsFaulted);
System.Private.CoreLib (18)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (4)
230Debug.Assert(faultedTask != null && faultedTask.IsFaulted && faultedTask.Exception!.InnerExceptionCount > 0, 382if (!exclusiveTask.IsFaulted) m_exclusiveTaskScheduler.ExecuteTask(exclusiveTask); 429if (!concurrentTask.IsFaulted) m_concurrentTaskScheduler.ExecuteTask(concurrentTask); 647Debug.Assert(t.IsFaulted, "Task should be faulted due to the scheduler faulting it and throwing the exception.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (12)
1403if (IsFaulted) e = GetExceptions(false); 1408Debug.Assert((e == null) || IsFaulted, "Task.Exception_get(): returning non-null value when not Faulted"); 1670/// If <see cref="IsFaulted"/> is true, the Task's <see cref="Status"/> will be equal to 2016Debug.Assert(IsFaulted && ExceptionRecorded, "Must only be used when the task has faulted with exceptions."); 2314if (childTask.IsFaulted && !childTask.IsExceptionObservedByParent) 2370if (task.IsFaulted && !task.IsExceptionObservedByParent) 2524log.TaskCompleted(previousTask.m_taskScheduler!.Id, previousTask.Id, this.Id, IsFaulted); 2526log.TaskCompleted(TaskScheduler.Current.Id, 0, this.Id, IsFaulted); 5170if (task.IsFaulted) exceptionSeen = true; 5191if (task.IsFaulted) exceptionSeen = true; 6340if (task.IsFaulted) 6617if (task.IsFaulted)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (2)
362return t.IsFaulted; 772return t.IsFaulted;
System.Runtime.InteropServices.JavaScript (1)
System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs (1)
246if (t.IsFaulted)
System.ServiceModel.Federation (2)
System\Runtime\TaskHelpers.cs (2)
46if (antecedent.IsFaulted) 102if (antecedent.IsFaulted)
System.ServiceModel.Http (2)
System\ServiceModel\Channels\WebSocketHelper.cs (2)
190if (task.IsFaulted) 203if (task.IsFaulted)
System.ServiceModel.Primitives (5)
Internals\System\Runtime\TaskHelpers.cs (2)
61if (antecedent.IsFaulted) 117if (antecedent.IsFaulted)
System\ServiceModel\Channels\ReliableChannelBinder.cs (1)
1842if (_tcs.Task.IsFaulted)
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (2)
76if (invokeTask.IsFaulted) 87if (task.IsFaulted)
System.ServiceModel.Primitives.Tests (1)
ServiceModel\ThrowingOnCloseBindingElement.cs (1)
165if (task.IsFaulted)
System.Threading.Tasks.Dataflow (21)
Base\DataflowBlock.cs (1)
2212return sourceCompletionTask != null && sourceCompletionTask.IsFaulted ?
Blocks\ActionBlock.cs (1)
205if (completed.IsFaulted)
Blocks\BatchBlock.cs (1)
84Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
Blocks\BatchedJoinBlock.cs (2)
102Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion."); 351Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
Blocks\BroadcastBlock.cs (3)
91Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion."); 1151Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions."); 1163Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
Blocks\BufferBlock.cs (1)
73Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
Blocks\JoinBlock.cs (2)
95Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion."); 314Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
Blocks\TransformBlock.cs (2)
143if (completed.IsFaulted) sourceCore.AddAndUnwrapAggregateException(completed.Exception!); 154Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
Blocks\TransformManyBlock.cs (2)
142if (completed.IsFaulted) sourceCore.AddAndUnwrapAggregateException(completed.Exception!); 153Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
Internal\Common.cs (2)
484Debug.Assert(task.IsFaulted, "The task should have been faulted if it failed to start."); 552AggregateException? exception = sourceCompletionTask.IsFaulted ? sourceCompletionTask.Exception : null;
Internal\DataflowEtwProvider.cs (1)
138if (completionTask.IsFaulted)
Internal\SourceCore.cs (3)
457Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions."); 469Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions."); 484Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");