public CircuitBreaker( TaskScheduler taskScheduler, int maxFailures, TimeSpan invocationTimeout, TimeSpan circuitResetTimeout) { var invoker = new CircuitBreakerInvoker(taskScheduler); _closedState = new ClosedCircuitBreakerState( this, invoker, maxFailures, invocationTimeout); _halfOpenedState = new HalfOpenCircuitBreakerState( this, invoker, invocationTimeout); _openedState = new OpenCircuitBreakerState( this, invoker, circuitResetTimeout); _currentState = _closedState; }
public void Close(IRunningTastState state) { throw new NotImplementedException(); }