public HalfOpenState(CircuitBreaker circuitBreaker)
     : base(circuitBreaker)
 {
 }
 protected CircuitBreakerState(CircuitBreaker circuitBreaker)
 {
     this.circuitBreaker = circuitBreaker;
 }
 public ClosedState(CircuitBreaker circuitBreaker)
     : base(circuitBreaker)
 {
     circuitBreaker.ResetFailureCount();
 }
 public OpenState(CircuitBreaker circuitBreaker)
     : base(circuitBreaker)
 {
     timer = new Timer(circuitBreaker.Timeout.TotalMilliseconds);
     timer.Elapsed += TimeoutHasBeenReached;
     timer.AutoReset = false;
     timer.Start();
 }