internal CircuitBreakerState MoveToClosedState() { this.state = new ClosedState(this); this.NotifyStateChange(this.state); return(this.state); }
internal CircuitBreakerState MoveToHalfOpenState() { this.state = new HalfOpenState(this); this.NotifyStateChange(this.state); return(this.state); }
/// <summary> /// Call the stage change event /// </summary> /// <param name="state"></param> private void NotifyStateChange(CircuitBreakerState state) { this.OnStateChange?.Invoke(this, state); }