I have an older policy that fallsback to a custom action.
// Several other overloads including one that's synchronous and has `void` as a return type. // Required as some of our older services have not been asyncified yetpublic void RetryWithPolicy(Action action) { var policy = Policy.Handle<BrokenCircuitException>() .Fallback(_ => action()) .Wrap(someCircuitBreakerPolicy) .Wrap(someWaitAndRetryPolicy); policy.Execute(action);}
I'm unable to find a way to do this using the new resilience strategy properly? Is the correct way to add a hedging strategy that allows the callback to be re-executed? Looking at the fallback strategy, I wasn't able to find a way to execute the callback?