public static CircuitBreakerAsync ( this policyBuilder, int exceptionsAllowedBeforeBreaking, System.TimeSpan durationOfBreak ) : |
||
policyBuilder | this | The policy builder. |
exceptionsAllowedBeforeBreaking | int | The number of exceptions that are allowed before opening the circuit. |
durationOfBreak | System.TimeSpan | The duration the circuit will stay open before resetting. |
return |
public static CircuitBreakerPolicy CircuitBreakerAsync(this PolicyBuilder policyBuilder, int exceptionsAllowedBeforeBreaking, TimeSpan durationOfBreak)
{
Action<Exception, TimeSpan> doNothingOnBreak = (_, __) => { };
Action doNothingOnReset = () => { };
return policyBuilder.CircuitBreakerAsync(
exceptionsAllowedBeforeBreaking,
durationOfBreak,
doNothingOnBreak,
doNothingOnReset
);
}
CircuitBreakerSyntaxAsync::CircuitBreakerAsync ( this policyBuilder, int exceptionsAllowedBeforeBreaking, System.TimeSpan durationOfBreak, Action |
|
CircuitBreakerSyntaxAsync::CircuitBreakerAsync ( this policyBuilder, int exceptionsAllowedBeforeBreaking, System.TimeSpan durationOfBreak, Action |
|
CircuitBreakerSyntaxAsync::CircuitBreakerAsync ( this policyBuilder, int exceptionsAllowedBeforeBreaking, System.TimeSpan durationOfBreak, TimeSpan>.Action |
|
CircuitBreakerSyntaxAsync::CircuitBreakerAsync ( this policyBuilder, int exceptionsAllowedBeforeBreaking, System.TimeSpan durationOfBreak, TimeSpan>.Action |