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

ICircuitBreakerPolicy

public interface ICircuitBreakerPolicy : IsPolicy
Defines properties and methods common to all circuit-breaker policies.

Gets the state of the underlying circuit.

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.

void Isolate()

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

void Reset()

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