AsyncBulkheadEngine
using System;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
namespace Polly.Bulkhead
{
internal static class AsyncBulkheadEngine
{
[System.Runtime.CompilerServices.NullableContext(1)]
[AsyncStateMachine(typeof(<ImplementationAsync>d__0<>))]
internal static Task<TResult> ImplementationAsync<[System.Runtime.CompilerServices.Nullable(2)] TResult>(Func<Context, CancellationToken, Task<TResult>> action, Context context, Func<Context, Task> onBulkheadRejectedAsync, SemaphoreSlim maxParallelizationSemaphore, SemaphoreSlim maxQueuedActionsSemaphore, CancellationToken cancellationToken, bool continueOnCapturedContext)
{
<ImplementationAsync>d__0<TResult> stateMachine = default(<ImplementationAsync>d__0<TResult>);
stateMachine.<>t__builder = AsyncTaskMethodBuilder<TResult>.Create();
stateMachine.action = action;
stateMachine.context = context;
stateMachine.onBulkheadRejectedAsync = onBulkheadRejectedAsync;
stateMachine.maxParallelizationSemaphore = maxParallelizationSemaphore;
stateMachine.maxQueuedActionsSemaphore = maxQueuedActionsSemaphore;
stateMachine.cancellationToken = cancellationToken;
stateMachine.continueOnCapturedContext = continueOnCapturedContext;
stateMachine.<>1__state = -1;
stateMachine.<>t__builder.Start(ref stateMachine);
return stateMachine.<>t__builder.Task;
}
}
}