<PackageReference Include="Polly" Version="8.4.1" />

AsyncNoOpPolicy<TResult>

public class AsyncNoOpPolicy<TResult> : AsyncPolicy<TResult>, INoOpPolicy<TResult>, INoOpPolicy, IsPolicy
A noop policy that can be applied to asynchronous delegates returning a value of type TResult.
using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; namespace Polly.NoOp { [System.Runtime.CompilerServices.Nullable(new byte[] { 0, 1 })] public class AsyncNoOpPolicy<[System.Runtime.CompilerServices.Nullable(2)] TResult> : AsyncPolicy<TResult>, INoOpPolicy<TResult>, INoOpPolicy, IsPolicy { internal AsyncNoOpPolicy() : base((PolicyBuilder<TResult>)null) { } [System.Runtime.CompilerServices.NullableContext(1)] [DebuggerStepThrough] protected override Task<TResult> ImplementationAsync(Func<Context, CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext) { return NoOpEngine.ImplementationAsync<TResult>(action, context, cancellationToken); } } }