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

CircuitBreakerPolicy

A circuit-breaker policy that can be applied to delegates.
public CircuitState CircuitState { get; }

Gets the state of the underlying circuit.

public Exception LastException { get; }

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 void Isolate()

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

public void Reset()

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