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

PolicyBuilder<TResult>

public sealed class PolicyBuilder<TResult>
Builder class that holds the list of current execution predicates filtering TResult result values.
public Type GetType()

Gets the Type of the current instance.

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

Specifies the type of exception that this policy can handle.

public PolicyBuilder<TResult> 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<TResult> 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<TResult> 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(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 result)

Specifies a result value which the policy will handle.