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

ISyncPolicy

public interface ISyncPolicy : IsPolicy
An interface defining all executions available on a non-generic, synchronous policy
void Execute(Action action)

Executes the specified action within the policy.

void Execute(Action<Context> action, IDictionary<string, object> contextData)

Executes the specified action within the policy.

void Execute(Action<Context> action, Context context)

Executes the specified action within the policy.

void Execute(Action<CancellationToken> action, CancellationToken cancellationToken)

void Execute(Action<Context, CancellationToken> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

Executes the specified action within the policy.

void Execute(Action<Context, CancellationToken> action, Context context, CancellationToken cancellationToken)

Executes the specified action within the policy.

TResult Execute<TResult>(Func<TResult> action)

Executes the specified action within the policy and returns the Result.

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

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

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

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

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

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

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

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

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

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

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

PolicyResult ExecuteAndCapture(Action<Context> action, IDictionary<string, object> contextData)

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 action within the policy and returns the captured result

PolicyResult ExecuteAndCapture(Action<Context, CancellationToken> action, IDictionary<string, object> contextData, CancellationToken cancellationToken)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ISyncPolicy WithPolicyKey(string policyKey)

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