### Example Git Commit Source: https://github.com/rebus-org/rebus.circuitbreaker/blob/master/CONTRIBUTING.md An example of how to make a commit to your local copy of the repository. ```bash git commit -am"bam!!!11" ``` -------------------------------- ### Custom OptionsConfigurer Extension Source: https://github.com/rebus-org/rebus.circuitbreaker/blob/master/README.md Example of creating a custom extension for Rebus OptionsConfigurer to register a custom event listener. ```csharp public static class MyCustomOptionsConfigurerExtensions { public static void RegisterMyCustomCircuitBreakerEventListener(this OptionsConfigurer self) { self.Register(c => new MyCustomCircuitBreakerEventListener(c.Get())); } } ``` -------------------------------- ### Custom Event Listener Source: https://github.com/rebus-org/rebus.circuitbreaker/blob/master/README.md Example of creating a custom event listener for circuit breaker state changes. ```csharp public class MyCustomCircuitBreakerEventListener : IDisposable { CircuitBreakerEvents _circuitBreakerEvents; public MyCircuitBreakerEventListener(CircuitBreakerEvents circuitBreakerEvents) { _circuitBreakerEvents = circuitBreakerEvents; _circuitBreakerEvents.CircuitBreakerChanged += CircuitBreakerEvents_CircuitBreakerChanged; } private void CircuitBreakerEvents_CircuitBreakerChanged(CircuitBreakerState state) { // Your implementation } public void Dispose() { _circuitBreakerEvents = null; } } ``` -------------------------------- ### Basic Usage Source: https://github.com/rebus-org/rebus.circuitbreaker/blob/master/README.md Enables the circuit breaker plugin with a default configuration. ```csharp Configure.With(...) .(...) .Options(o => o.EnableCircuitBreaker(c => c.OpenOn())) .Start(); ``` -------------------------------- ### Configuring Rebus with Custom Listener Source: https://github.com/rebus-org/rebus.circuitbreaker/blob/master/README.md Configures Rebus to use the circuit breaker with a custom event listener registered. ```csharp Configure.With(...) .(...) .Options(o => o.EnableCircuitBreaker(c => { c.OpenOn() c.RegisterMyCustomCircuitBreakerEventListener() })) .Start(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.