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

PolicyResult

public class PolicyResult
The captured result of executing a policy
public Context Context { get; }

The context for this execution.

public ExceptionType? ExceptionType { get; }

The exception type of the final exception captured. Will be null if policy executed successfully

public Exception FinalException { get; }

The final exception captured. Will be null if policy executed successfully

public OutcomeType Outcome { get; }

The outcome of executing the policy

public static PolicyResult Failure(Exception exception, ExceptionType exceptionType, Context context)

Builds a PolicyResult representing a failed execution through the policy. />

public static PolicyResult Successful(Context context)

Builds a PolicyResult representing a successful execution through the policy.