public static CircuitBreakerContext Create(Action<CircuitBreakerThreshold> setter)
        {
            CircuitBreakerContext instance = new CircuitBreakerContext();
            instance.SetThreshold(setter);
            ClosedCircuitBreaker circuitBreaker = new ClosedCircuitBreaker(instance);
            instance.StatedBreaker = circuitBreaker;

            return instance;
        }
 internal void TransferCloseState()
 {
     if (StatedBreaker != null)
         StatedBreaker.Dispose();
     StatedBreaker = new ClosedCircuitBreaker(this);
 }