72 references to ConfigureAwaitOptions
aspire (2)
Commands\PublishCommandBase.cs (2)
598.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing); 643await ContextTask.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Aspire.Hosting (4)
Dashboard\DashboardLifecycleHook.cs (1)
458await Task.WhenAll(dashboardResourceTasks.Values).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Dcp\ResourceLogSource.cs (1)
58await Task.WhenAll(streamTasks).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Health\ResourceHealthCheckService.cs (2)
257await task.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing); 365await delayInterruptedTask.WaitAsync(delay, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\AzureProvisioner.cs (1)
187await task.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Aspire.Hosting.Testing (1)
DistributedApplicationFactory.cs (1)
423await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
InMemory.FunctionalTests (1)
Http2\Http2TestBase.cs (1)
578await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
Microsoft.AspNetCore.Components (3)
Rendering\RendererSynchronizationContext.cs (3)
182antecedent.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing).GetAwaiter().GetResult(); 193await antecedent.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing | ConfigureAwaitOptions.ForceYielding);
Microsoft.AspNetCore.Hosting (2)
WebHostExtensions.cs (2)
161.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing | ConfigureAwaitOptions.ContinueOnCapturedContext);
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
269await ((Task)connection.TransportTask!).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
Shared\TestPipeWriter.cs (1)
51await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
Microsoft.AspNetCore.SignalR.Tests (1)
HubConnectionHandlerTests.Activity.cs (1)
378await connectionHandlerTask.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Microsoft.Extensions.Hosting.Abstractions (2)
BackgroundService.cs (1)
73await _executeTask.WaitAsync(cancellationToken).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
HostingAbstractionsHostExtensions.cs (1)
101await Task.Delay(Timeout.Infinite, applicationLifetime.ApplicationStopping).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Microsoft.Extensions.ServiceDiscovery (4)
Http\HttpServiceEndpointResolver.cs (1)
121await _cleanupTask.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
ServiceEndpointResolver.cs (1)
130await _cleanupTask.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
ServiceEndpointWatcher.cs (2)
131await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding); 276await task.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Microsoft.Extensions.ServiceDiscovery.Dns (1)
DnsServiceEndpointProviderBase.cs (1)
161await task.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
System.Private.CoreLib (45)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (1)
114TaskAwaiter.UnsafeOnCompletedInternal(ta.m_task, box, (ta.m_options & ConfigureAwaitOptions.ContinueOnCapturedContext) != 0);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs (23)
79internal static void ValidateEnd(Task task, ConfigureAwaitOptions options = ConfigureAwaitOptions.None) 98private static void HandleNonSuccessAndDebuggerNotification(Task task, ConfigureAwaitOptions options) 116if ((options & ConfigureAwaitOptions.SuppressThrowing) == 0) 364internal ConfiguredTaskAwaitable(Task task, ConfigureAwaitOptions options) 386/// <summary>Options for how this awaiter behaves. This is a bit field with values from <see cref="ConfigureAwaitOptions"/>.</summary> 387internal readonly ConfigureAwaitOptions m_options; 392internal ConfiguredTaskAwaiter(Task task, ConfigureAwaitOptions options) 395Debug.Assert((options & ~(ConfigureAwaitOptions.ContinueOnCapturedContext | ConfigureAwaitOptions.SuppressThrowing | ConfigureAwaitOptions.ForceYielding)) == 0); 403public bool IsCompleted => ((m_options & ConfigureAwaitOptions.ForceYielding) == 0) && m_task.IsCompleted; 412TaskAwaiter.OnCompletedInternal(m_task, continuation, (m_options & ConfigureAwaitOptions.ContinueOnCapturedContext) != 0, flowExecutionContext: true); 422TaskAwaiter.OnCompletedInternal(m_task, continuation, (m_options & ConfigureAwaitOptions.ContinueOnCapturedContext) != 0, flowExecutionContext: false); 447internal ConfiguredTaskAwaitable(Task<TResult> task, ConfigureAwaitOptions options) 468/// <summary>Options for how this awaiter behaves. This is a bit field with values from <see cref="ConfigureAwaitOptions"/>.</summary> 469internal readonly ConfigureAwaitOptions m_options; 474internal ConfiguredTaskAwaiter(Task<TResult> task, ConfigureAwaitOptions options) 477Debug.Assert((options & ~(ConfigureAwaitOptions.ContinueOnCapturedContext | ConfigureAwaitOptions.ForceYielding)) == 0); 485public bool IsCompleted => ((m_options & ConfigureAwaitOptions.ForceYielding) == 0) && m_task.IsCompleted; 494TaskAwaiter.OnCompletedInternal(m_task, continuation, (m_options & ConfigureAwaitOptions.ContinueOnCapturedContext) != 0, flowExecutionContext: true); 504TaskAwaiter.OnCompletedInternal(m_task, continuation, (m_options & ConfigureAwaitOptions.ContinueOnCapturedContext) != 0, flowExecutionContext: false);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
1163await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (2)
724await ((Task)asyncWaiter.WaitAsync(TimeSpan.FromMilliseconds(millisecondsTimeout), cancellationToken)).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing); 731await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConfigureAwaitOptions.cs (5)
12/// <see cref="Task.ConfigureAwait(ConfigureAwaitOptions)"/> with a <see cref="None"/> argument behaves 24/// <see cref="Task.ConfigureAwait(ConfigureAwaitOptions)"/> with a <see cref="ContinueOnCapturedContext"/> argument 34/// This option is supported only for <see cref="Task.ConfigureAwait(ConfigureAwaitOptions)"/>, 35/// not <see cref="Task{TResult}.ConfigureAwait(ConfigureAwaitOptions)"/>, as for a <see cref="Task{TResult}"/> the 37/// cast to the base <see cref="Task"/> type in order to use its <see cref="Task.ConfigureAwait(ConfigureAwaitOptions)"/>.
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (7)
515return new ConfiguredTaskAwaitable<TResult>(this, continueOnCapturedContext ? ConfigureAwaitOptions.ContinueOnCapturedContext : ConfigureAwaitOptions.None); 523public new ConfiguredTaskAwaitable<TResult> ConfigureAwait(ConfigureAwaitOptions options) 525if ((options & ~(ConfigureAwaitOptions.ContinueOnCapturedContext | 526ConfigureAwaitOptions.ForceYielding)) != 0) 533static void ThrowForInvalidOptions(ConfigureAwaitOptions options) => 534throw ((options & ConfigureAwaitOptions.SuppressThrowing) == 0 ?
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (6)
2453return new ConfiguredTaskAwaitable(this, continueOnCapturedContext ? ConfigureAwaitOptions.ContinueOnCapturedContext : ConfigureAwaitOptions.None); 2461public ConfiguredTaskAwaitable ConfigureAwait(ConfigureAwaitOptions options) 2463if ((options & ~(ConfigureAwaitOptions.ContinueOnCapturedContext | 2464ConfigureAwaitOptions.SuppressThrowing | 2465ConfigureAwaitOptions.ForceYielding)) != 0)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
814[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.ConfigureAwaitOptions))]
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.WriteHelpers.cs (1)
204await state.PendingTask.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (1)
61ConfigureAwaitOptions.SuppressThrowing