Table of Contents

Class CircuitBreakerPolicy

Namespace
Polly.CircuitBreaker
Assembly
Polly.dll

A circuit-breaker policy that can be applied to delegates.

public class CircuitBreakerPolicy : Policy, ISyncPolicy, IAsyncPolicy, ICircuitBreakerPolicy, IsPolicy
Inheritance
CircuitBreakerPolicy
Implements
Inherited Members

Properties

CircuitState

Gets the state of the underlying circuit.

public CircuitState CircuitState { get; }

Property Value

CircuitState

LastException

Gets the last exception handled by the circuit-breaker. This will be null if no exceptions have been handled by the circuit-breaker since the circuit last closed.

public Exception LastException { get; }

Property Value

Exception

Methods

Isolate()

Isolates (opens) the circuit manually, and holds it in this state until a call to Reset() is made.

public void Isolate()

Reset()

Closes the circuit, and resets any statistics controlling automated circuit-breaking.

public void Reset()