Class PolicyResult
- Namespace
- Polly
- Assembly
- Polly.dll
The captured result of executing a policy
public class PolicyResult
- Inheritance
-
PolicyResult
- Inherited Members
Properties
Context
The context for this execution.
public Context Context { get; }
Property Value
ExceptionType
The exception type of the final exception captured. Will be null if policy executed successfully
public ExceptionType? ExceptionType { get; }
Property Value
FinalException
The final exception captured. Will be null if policy executed successfully
public Exception FinalException { get; }
Property Value
Outcome
The outcome of executing the policy
public OutcomeType Outcome { get; }
Property Value
Methods
Failure(Exception, ExceptionType, Context)
Builds a PolicyResult representing a failed execution through the policy. />
public static PolicyResult Failure(Exception exception, ExceptionType exceptionType, Context context)
Parameters
exception
ExceptionThe exception
exceptionType
ExceptionTypeThe exception type
context
ContextThe policy execution context
Returns
- PolicyResult
A PolicyResult representing a failed execution through the policy.
Successful(Context)
Builds a PolicyResult representing a successful execution through the policy.
public static PolicyResult Successful(Context context)
Parameters
context
ContextThe policy execution context
Returns
- PolicyResult
A PolicyResult representing a successful execution through the policy.