Table of Contents

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

Context

ExceptionType

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

public ExceptionType? ExceptionType { get; }

Property Value

ExceptionType?

FinalException

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

public Exception FinalException { get; }

Property Value

Exception

Outcome

The outcome of executing the policy

public OutcomeType Outcome { get; }

Property Value

OutcomeType

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 Exception

The exception

exceptionType ExceptionType

The exception type

context Context

The 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 Context

The policy execution context

Returns

PolicyResult

A PolicyResult representing a successful execution through the policy.