345 references to TaskStatus
Aspire.Hosting.Testing.Tests (1)
dotnet-svcutil-lib (1)
GenerateDocumentationAndConfigFiles (1)
Metrics (1)
Metrics.Legacy (1)
Microsoft.AspNetCore.Components (16)
Microsoft.AspNetCore.Components.Tests (22)
RendererTest.cs (18)
1361Assert.Equal(TaskStatus.RanToCompletion, task.Status);
1393Assert.Equal(TaskStatus.RanToCompletion, task.Status);
1428Assert.Equal(TaskStatus.RanToCompletion, task.Status);
1462Assert.Equal(TaskStatus.Canceled, task.Status);
1494Assert.Equal(TaskStatus.Canceled, task.Status);
1530Assert.Equal(TaskStatus.Canceled, task.Status);
1564Assert.Equal(TaskStatus.Faulted, task.Status);
1596Assert.Equal(TaskStatus.Faulted, task.Status);
1632Assert.Equal(TaskStatus.Faulted, task.Status);
1668Assert.Equal(TaskStatus.WaitingForActivation, task.Status);
1703Assert.Equal(TaskStatus.WaitingForActivation, task.Status);
1742Assert.Equal(TaskStatus.WaitingForActivation, task.Status);
1780Assert.Equal(TaskStatus.WaitingForActivation, task.Status);
1818Assert.Equal(TaskStatus.WaitingForActivation, task.Status);
1860Assert.Equal(TaskStatus.WaitingForActivation, task.Status);
1900Assert.Equal(TaskStatus.WaitingForActivation, task.Status);
1937Assert.Equal(TaskStatus.WaitingForActivation, task.Status);
1978Assert.Equal(TaskStatus.WaitingForActivation, task.Status);
Microsoft.AspNetCore.Mvc.Core (4)
Microsoft.AspNetCore.Mvc.RazorPages (5)
Microsoft.AspNetCore.OpenApi.Tests (11)
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (8)
163[(TaskStatus status = TaskStatus.Canceled) => { }, (JsonNode defaultValue) => Assert.Equal(6, defaultValue.GetValue<int>())],
170[([DefaultValue(TaskStatus.Canceled)] TaskStatus status) => { }, (JsonNode defaultValue) => Assert.Equal(6, defaultValue.GetValue<int>())],
176[([DefaultValue(null)] TaskStatus? status) => { }, (JsonNode defaultValue) => Assert.True(defaultValue is null)],
177[([DefaultValue(TaskStatus.Canceled)] TaskStatus? status) => { }, (JsonNode defaultValue) => Assert.Equal(6, defaultValue.GetValue<int>())],
208builder.MapGet("/api", (TaskStatus status) => { });
Microsoft.AspNetCore.SignalR.Client.Core (2)
Microsoft.AspNetCore.SignalR.Client.Tests (6)
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.Analyzers (1)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures (6)
Microsoft.CodeAnalysis.InteractiveHost (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
Microsoft.CodeAnalysis.Remote.Workspaces (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
Microsoft.CodeAnalysis.Scripting.TestUtilities (3)
Microsoft.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces (4)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (9)
Microsoft.Extensions.Caching.Hybrid.Tests (3)
Microsoft.Maui.Controls (3)
Microsoft.ML.Core (2)
Microsoft.ML.Core.Tests (1)
Microsoft.ML.Sweeper.Tests (1)
Microsoft.VisualStudio.LanguageServices (1)
mscorlib (1)
netstandard (1)
Roslyn.Diagnostics.Analyzers (1)
System.Data.Odbc (1)
System.IO.Compression.Brotli (5)
System.Net.Http (13)
System.Net.NameResolution (1)
System.Private.CoreLib (175)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (34)
1267/// Gets the <see cref="TaskStatus">TaskStatus</see> of this Task.
1269public TaskStatus Status
1273TaskStatus rval;
1280if ((sf & (int)TaskStateFlags.Faulted) != 0) rval = TaskStatus.Faulted;
1281else if ((sf & (int)TaskStateFlags.Canceled) != 0) rval = TaskStatus.Canceled;
1282else if ((sf & (int)TaskStateFlags.RanToCompletion) != 0) rval = TaskStatus.RanToCompletion;
1283else if ((sf & (int)TaskStateFlags.WaitingOnChildren) != 0) rval = TaskStatus.WaitingForChildrenToComplete;
1284else if ((sf & (int)TaskStateFlags.DelegateInvoked) != 0) rval = TaskStatus.Running;
1285else if ((sf & (int)TaskStateFlags.Started) != 0) rval = TaskStatus.WaitingToRun;
1286else if ((sf & (int)TaskStateFlags.WaitingForActivation) != 0) rval = TaskStatus.WaitingForActivation;
1287else rval = TaskStatus.Created;
1371/// final states: <see cref="TaskStatus.RanToCompletion">RanToCompletion</see>,
1372/// <see cref="TaskStatus.Faulted">Faulted</see>, or
1373/// <see cref="TaskStatus.Canceled">Canceled</see>.
1519/// <see cref="TaskStatus.Faulted">TaskStatus.Faulted</see>, and its
1569/// the final states: <see cref="TaskStatus.RanToCompletion">RanToCompletion</see>,
1570/// <see cref="TaskStatus.Faulted">Faulted</see>, or
1571/// <see cref="TaskStatus.Canceled">Canceled</see>.
1575/// one of the final states: <see cref="TaskStatus.RanToCompletion">RanToCompletion</see>,
1576/// <see cref="TaskStatus.Faulted">Faulted</see>, or
1577/// <see cref="TaskStatus.Canceled">Canceled</see>.
2923TaskStatus.Canceled => TrySetCanceled(completingTask.CancellationToken, completingTask.GetCancellationExceptionDispatchInfo()),
2924TaskStatus.Faulted => TrySetException(completingTask.GetExceptionDispatchInfos()),
5360Debug.Assert(firstCompleted.Status == TaskStatus.RanToCompletion);
6461Debug.Assert(task.Status == TaskStatus.RanToCompletion);
7169public bool CancellationPending => (m_task.Status == TaskStatus.WaitingToRun) && m_task.CancellationToken.IsCancellationRequested;
7170public TaskStatus Status => m_task.Status;
7271/// cref="TaskStatus">TaskStatus</see>.
7498case TaskStatus.Canceled:
7499case TaskStatus.Faulted:
7505case TaskStatus.RanToCompletion:
7526case TaskStatus.Canceled:
7530case TaskStatus.Faulted:
7545case TaskStatus.RanToCompletion:
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (52)
78/// <summary>Transitions the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.Faulted"/> state.</summary>
83/// <see cref="TaskStatus.RanToCompletion"/>,
84/// <see cref="TaskStatus.Faulted"/>, or
85/// <see cref="TaskStatus.Canceled"/>.
95/// <summary>Transitions the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.Faulted"/> state.</summary>
101/// <see cref="TaskStatus.RanToCompletion"/>,
102/// <see cref="TaskStatus.Faulted"/>, or
103/// <see cref="TaskStatus.Canceled"/>.
114/// Attempts to transition the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.Faulted"/> state.
120/// <see cref="TaskStatus.RanToCompletion"/>,
121/// <see cref="TaskStatus.Faulted"/>, or
122/// <see cref="TaskStatus.Canceled"/>.
142/// Attempts to transition the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.Faulted"/> state.
148/// <see cref="TaskStatus.RanToCompletion"/>,
149/// <see cref="TaskStatus.Faulted"/>, or
150/// <see cref="TaskStatus.Canceled"/>.
188/// Transitions the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.RanToCompletion"/> state.
192/// <see cref="TaskStatus.RanToCompletion"/>,
193/// <see cref="TaskStatus.Faulted"/>, or
194/// <see cref="TaskStatus.Canceled"/>.
205/// Attempts to transition the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.RanToCompletion"/> state.
210/// <see cref="TaskStatus.RanToCompletion"/>,
211/// <see cref="TaskStatus.Faulted"/>, or
212/// <see cref="TaskStatus.Canceled"/>.
226/// Transitions the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.Canceled"/> state.
230/// <see cref="TaskStatus.RanToCompletion"/>,
231/// <see cref="TaskStatus.Faulted"/>, or
232/// <see cref="TaskStatus.Canceled"/>.
237/// Transitions the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.Canceled"/> state
243/// <see cref="TaskStatus.RanToCompletion"/>,
244/// <see cref="TaskStatus.Faulted"/>, or
245/// <see cref="TaskStatus.Canceled"/>.
256/// Attempts to transition the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.Canceled"/> state.
261/// <see cref="TaskStatus.RanToCompletion"/>,
262/// <see cref="TaskStatus.Faulted"/>, or
263/// <see cref="TaskStatus.Canceled"/>.
268/// Attempts to transition the underlying <see cref="Tasks.Task"/> into the <see cref="TaskStatus.Canceled"/> state.
274/// <see cref="TaskStatus.RanToCompletion"/>,
275/// <see cref="TaskStatus.Faulted"/>, or
276/// <see cref="TaskStatus.Canceled"/>.
297/// <see cref="TaskStatus.RanToCompletion"/>, <see cref="TaskStatus.Faulted"/>, or <see cref="TaskStatus.Canceled"/>.
301/// <see cref="TaskStatus.RanToCompletion"/>, <see cref="TaskStatus.Faulted"/>, or <see cref="TaskStatus.Canceled"/>.
320/// <see cref="TaskStatus.RanToCompletion"/>, <see cref="TaskStatus.Faulted"/>, or <see cref="TaskStatus.Canceled"/>.
334case TaskStatus.RanToCompletion:
338case TaskStatus.Canceled:
342case TaskStatus.Faulted:
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (52)
78/// <summary>Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Faulted"/> state.</summary>
83/// <see cref="TaskStatus.RanToCompletion"/>,
84/// <see cref="TaskStatus.Faulted"/>, or
85/// <see cref="TaskStatus.Canceled"/>.
95/// <summary>Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Faulted"/> state.</summary>
101/// <see cref="TaskStatus.RanToCompletion"/>,
102/// <see cref="TaskStatus.Faulted"/>, or
103/// <see cref="TaskStatus.Canceled"/>.
114/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Faulted"/> state.
120/// <see cref="TaskStatus.RanToCompletion"/>,
121/// <see cref="TaskStatus.Faulted"/>, or
122/// <see cref="TaskStatus.Canceled"/>.
142/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Faulted"/> state.
148/// <see cref="TaskStatus.RanToCompletion"/>,
149/// <see cref="TaskStatus.Faulted"/>, or
150/// <see cref="TaskStatus.Canceled"/>.
188/// Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.RanToCompletion"/> state.
193/// <see cref="TaskStatus.RanToCompletion"/>,
194/// <see cref="TaskStatus.Faulted"/>, or
195/// <see cref="TaskStatus.Canceled"/>.
206/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.RanToCompletion"/> state.
212/// <see cref="TaskStatus.RanToCompletion"/>,
213/// <see cref="TaskStatus.Faulted"/>, or
214/// <see cref="TaskStatus.Canceled"/>.
228/// Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Canceled"/> state.
232/// <see cref="TaskStatus.RanToCompletion"/>,
233/// <see cref="TaskStatus.Faulted"/>, or
234/// <see cref="TaskStatus.Canceled"/>.
239/// Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Canceled"/> state
245/// <see cref="TaskStatus.RanToCompletion"/>,
246/// <see cref="TaskStatus.Faulted"/>, or
247/// <see cref="TaskStatus.Canceled"/>.
258/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Canceled"/> state.
263/// <see cref="TaskStatus.RanToCompletion"/>,
264/// <see cref="TaskStatus.Faulted"/>, or
265/// <see cref="TaskStatus.Canceled"/>.
270/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Canceled"/> state.
276/// <see cref="TaskStatus.RanToCompletion"/>,
277/// <see cref="TaskStatus.Faulted"/>, or
278/// <see cref="TaskStatus.Canceled"/>.
299/// <see cref="TaskStatus.RanToCompletion"/>, <see cref="TaskStatus.Faulted"/>, or <see cref="TaskStatus.Canceled"/>.
303/// <see cref="TaskStatus.RanToCompletion"/>, <see cref="TaskStatus.Faulted"/>, or <see cref="TaskStatus.Canceled"/>.
322/// <see cref="TaskStatus.RanToCompletion"/>, <see cref="TaskStatus.Faulted"/>, or <see cref="TaskStatus.Canceled"/>.
336case TaskStatus.RanToCompletion:
340case TaskStatus.Canceled:
344case TaskStatus.Faulted:
System.Runtime (1)
System.ServiceModel.Primitives (3)
System.Threading.Tasks (1)
System.Threading.Tasks.Dataflow (17)
Test.Utilities (1)
Text.Analyzers (1)
VBCSCompiler (2)