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

IAsyncPolicy

public interface IAsyncPolicy : IsPolicy
An interface defining all executions available on a non-generic, asynchronous policy

Executes the specified asynchronous action within the policy and returns the captured result.

Task<PolicyResult> ExecuteAndCaptureAsync(Func<Context, Task> action, IDictionary<string, object> contextData)

Executes the specified asynchronous action within the policy and returns the captured result.

Executes the specified asynchronous action within the policy and returns the captured result.

Executes the specified asynchronous action within the policy and returns the captured result.

Task<PolicyResult> ExecuteAndCaptureAsync(Func<Context, CancellationToken, Task> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

Executes the specified asynchronous action within the policy and returns the captured result.

Executes the specified asynchronous action within the policy and returns the captured result.

Task<PolicyResult> ExecuteAndCaptureAsync(Func<CancellationToken, Task> action, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy and returns the captured result.

Task<PolicyResult> ExecuteAndCaptureAsync(Func<Context, CancellationToken, Task> action, IDictionary<string, object> contextData, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy and returns the captured result.

Task<PolicyResult> ExecuteAndCaptureAsync(Func<Context, CancellationToken, Task> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy and returns the captured result.

Task<PolicyResult<TResult>> ExecuteAndCaptureAsync<TResult>(Func<Task<TResult>> action)

Executes the specified asynchronous action within the policy and returns the result.

Task<PolicyResult<TResult>> ExecuteAndCaptureAsync<TResult>(Func<Context, Task<TResult>> action, IDictionary<string, object> contextData)

Executes the specified asynchronous action within the policy and returns the result.

Task<PolicyResult<TResult>> ExecuteAndCaptureAsync<TResult>(Func<Context, Task<TResult>> action, Context context)

Executes the specified asynchronous action within the policy and returns the result.

Task<PolicyResult<TResult>> ExecuteAndCaptureAsync<TResult>(Func<CancellationToken, Task<TResult>> action, CancellationToken cancellationToken)

Executes the specified asynchronous action within the policy and returns the result.

Task<PolicyResult<TResult>> ExecuteAndCaptureAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

Executes the specified asynchronous action within the policy and returns the result.

Task<PolicyResult<TResult>> ExecuteAndCaptureAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken)

Executes the specified asynchronous action within the policy and returns the result.

Task<PolicyResult<TResult>> ExecuteAndCaptureAsync<TResult>(Func<CancellationToken, Task<TResult>> action, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy and returns the result.

Task<PolicyResult<TResult>> ExecuteAndCaptureAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action, IDictionary<string, object> contextData, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy and returns the result.

Task<PolicyResult<TResult>> ExecuteAndCaptureAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy and returns the result.

Executes the specified asynchronous action within the policy.

Task ExecuteAsync(Func<Context, Task> action, IDictionary<string, object> contextData)

Executes the specified asynchronous action within the policy.

Executes the specified asynchronous action within the policy.

Executes the specified asynchronous action within the policy.

Task ExecuteAsync(Func<Context, CancellationToken, Task> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

Executes the specified asynchronous action within the policy.

Executes the specified asynchronous action within the policy.

Task ExecuteAsync(Func<CancellationToken, Task> action, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy.

Task ExecuteAsync(Func<Context, CancellationToken, Task> action, IDictionary<string, object> contextData, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy.

Task ExecuteAsync(Func<Context, CancellationToken, Task> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy.

Task<TResult> ExecuteAsync<TResult>(Func<Task<TResult>> action)

Executes the specified asynchronous action within the policy and returns the result.

Task<TResult> ExecuteAsync<TResult>(Func<Context, Task<TResult>> action, Context context)

Executes the specified asynchronous action within the policy and returns the result.

Task<TResult> ExecuteAsync<TResult>(Func<Context, Task<TResult>> action, IDictionary<string, object> contextData)

Executes the specified asynchronous action within the policy and returns the result.

Task<TResult> ExecuteAsync<TResult>(Func<CancellationToken, Task<TResult>> action, CancellationToken cancellationToken)

Executes the specified asynchronous action within the policy and returns the result.

Task<TResult> ExecuteAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

Executes the specified asynchronous action within the policy and returns the result.

Task<TResult> ExecuteAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken)

Executes the specified asynchronous action within the policy and returns the result.

Task<TResult> ExecuteAsync<TResult>(Func<CancellationToken, Task<TResult>> action, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy and returns the result.

Task<TResult> ExecuteAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action, IDictionary<string, object> contextData, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy and returns the result.

Task<TResult> ExecuteAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext)

Executes the specified asynchronous action within the policy and returns the result.

IAsyncPolicy WithPolicyKey(string policyKey)

Sets the PolicyKey for this IAsyncPolicy instance. Must be called before the policy is first used. Can only be set once.