public CircuitBreaker(int threshold, TimeSpan resetEvery) { this.threshold = threshold; timer = new Timer(state => failureCount = 0, null, resetEvery, resetEvery); }