Пример #1
0
 internal CircuitBreakerState MoveToClosedState()
 {
     this.state = new ClosedState(this);
     this.NotifyStateChange(this.state);
     return(this.state);
 }
Пример #2
0
 internal CircuitBreakerState MoveToHalfOpenState()
 {
     this.state = new HalfOpenState(this);
     this.NotifyStateChange(this.state);
     return(this.state);
 }
Пример #3
0
 /// <summary>
 /// Call the stage change event
 /// </summary>
 /// <param name="state"></param>
 private void NotifyStateChange(CircuitBreakerState state)
 {
     this.OnStateChange?.Invoke(this, state);
 }