Skip to content

Instantly share code, notes, and snippets.

@aramkoukia
Created March 20, 2018 01:56
Show Gist options
  • Save aramkoukia/7fda6f4fe19c5ad478373f78f5e1fbbe to your computer and use it in GitHub Desktop.
Save aramkoukia/7fda6f4fe19c5ad478373f78f5e1fbbe to your computer and use it in GitHub Desktop.
Action<Exception, TimeSpan> onBreak = (exception, timespan) => { ... };
Action onReset = () => { ... };
CircuitBreakerPolicy breaker = Policy
.Handle<Exception>()
.CircuitBreaker(2, TimeSpan.FromMinutes(1), onBreak, onReset);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment