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

PolicyBuilder

public sealed class PolicyBuilder
Builder class that holds the list of current exception predicates.
public Type GetType()

Gets the Type of the current instance.

public PolicyBuilder Or<TException>() where TException : Exception

Specifies the type of exception that this policy can handle.

public PolicyBuilder Or<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.

public PolicyBuilder OrInner<TException>() where TException : Exception

Specifies the type of exception that this policy can handle if found as an InnerException of a regular Exception, or at any level of nesting within an AggregateException.

public PolicyBuilder OrInner<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, if found as an InnerException of a regular Exception, or at any level of nesting within an AggregateException.

public PolicyBuilder<TResult> OrResult<TResult>(Func<TResult, bool> resultPredicate)

Specifies the type of result that this policy can handle with additional filters on the result.

public PolicyBuilder<TResult> OrResult<TResult>(TResult result)

Specifies a result value which the policy will handle.