Slide 26
Slide 26 text
Example
Supervision
Strategy
protected override SupervisorStrategy SupervisorStrategy() =>
new OneForOneStrategy(
maxNrOfRetries: 10,
withinTimeRange: TimeSpan.FromSeconds(30),
decider: Decider.From(ex =>
{
if (ex is ArithmeticException)
return Directive.Resume;
else if (ex is NotSupportedException)
return Directive.Stop;
return Directive.Restart;
}));