Policy<TResult>
Transient fault handling policies that can be applied to delegates returning results of type
Specifies the type of exception that this policy can handle.
public static PolicyBuilder<TResult> Handle<TException>(Func<TException, bool> exceptionPredicate) where TException : Exception
Specifies the type of exception that this policy can handle with additional filters on this exception type.
Specifies a filter on the return result values that this strongly-typed generic policy will handle.
Specifies a return result value which the strongly-typed generic policy will handle.
Executes the specified action within the policy and returns the result.
Executes the specified action within the policy and returns the Result.
Executes the specified action within the policy and returns the captured result
Executes the specified action within the policy and returns the captured result.
Executes the specified asynchronous action within the policy and returns the result.
protected Task<PolicyResult<TResult>> ExecuteAndCaptureAsync(Func<Task<TResult>> action, Context context)
Executes the specified asynchronous action within the policy and returns the result.
public Task<PolicyResult<TResult>> ExecuteAndCaptureAsync(Func<Task<TResult>> action, bool continueOnCapturedContext)
Executes the specified asynchronous action within the policy and returns the result.
protected Task<PolicyResult<TResult>> ExecuteAndCaptureAsync(Func<Task<TResult>> action, Context context, bool continueOnCapturedContext)
Executes the specified asynchronous action within the policy and returns the result.
public Task<PolicyResult<TResult>> ExecuteAndCaptureAsync(Func<Task<TResult>> action, CancellationToken cancellationToken)
Executes the specified asynchronous action within the policy and returns the result.
protected Task<PolicyResult<TResult>> ExecuteAndCaptureAsync(Func<Task<TResult>> action, Context context, CancellationToken cancellationToken)
Executes the specified asynchronous action within the policy and returns the result.
public Task<PolicyResult<TResult>> ExecuteAndCaptureAsync(Func<CancellationToken, Task<TResult>> action, CancellationToken cancellationToken, bool continueOnCapturedContext)
Executes the specified asynchronous action within the policy and returns the result.
protected Task<PolicyResult<TResult>> ExecuteAndCaptureAsync(Func<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 and returns the result.
Executes the specified asynchronous action within the policy and returns the result.
public Task<TResult> ExecuteAsync(Func<CancellationToken, Task<TResult>> action, CancellationToken cancellationToken)
Executes the specified asynchronous action within the policy and returns the result.
protected Task<TResult> ExecuteAsync(Func<CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken)
Executes the specified asynchronous action within the policy and returns the result.
Executes the specified asynchronous action within the policy and returns the result.
protected Task<TResult> ExecuteAsync(Func<Task<TResult>> action, Context context, bool continueOnCapturedContext)
Executes the specified asynchronous action within the policy and returns the result.
public Task<TResult> ExecuteAsync(Func<CancellationToken, Task<TResult>> action, CancellationToken cancellationToken, bool continueOnCapturedContext)
Executes the specified asynchronous action within the policy and returns the result.
protected Task<TResult> ExecuteAsync(Func<CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext)
Executes the specified asynchronous action within the policy and returns the result.