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

Policy<TResult>

public abstract class Policy<TResult> : PolicyBase<TResult>, ISyncPolicy<TResult>, IsPolicy
protected Policy(PolicyBuilder<TResult> policyBuilder = null)

public static PolicyBuilder<TResult> Handle<TException>() where TException : Exception

public static PolicyBuilder<TResult> Handle<TException>(Func<TException, bool> exceptionPredicate) where TException : Exception

public static PolicyBuilder<TResult> HandleInner<TException>() where TException : Exception

public static PolicyBuilder<TResult> HandleInner<TException>(Func<TException, bool> exceptionPredicate) where TException : Exception

public static PolicyBuilder<TResult> HandleResult(Func<TResult, bool> resultPredicate)

public static PolicyBuilder<TResult> HandleResult(TResult result)

public TResult Execute(Func<TResult> action)

public TResult Execute(Func<Context, TResult> action, IDictionary<string, object> contextData)

public TResult Execute(Func<Context, TResult> action, Context context)

public TResult Execute(Func<CancellationToken, TResult> action, CancellationToken cancellationToken)

public TResult Execute(Func<Context, CancellationToken, TResult> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

public TResult Execute(Func<Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)

public PolicyResult<TResult> ExecuteAndCapture(Func<TResult> action)

public PolicyResult<TResult> ExecuteAndCapture(Func<Context, TResult> action, IDictionary<string, object> contextData)

public PolicyResult<TResult> ExecuteAndCapture(Func<Context, TResult> action, Context context)

public PolicyResult<TResult> ExecuteAndCapture(Func<CancellationToken, TResult> action, CancellationToken cancellationToken)

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

public PolicyResult<TResult> ExecuteAndCapture(Func<Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)

protected abstract TResult Implementation(Func<Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)

public Policy<TResult> WithPolicyKey(string policyKey)

public PolicyWrap<TResult> Wrap(ISyncPolicy innerPolicy)

public PolicyWrap<TResult> Wrap(ISyncPolicy<TResult> innerPolicy)