I'm using Unity to register a class to an interface and in the process of doing so, utilizing Unity interceptors as well. For one instance, I have the following:
The RetryBehavior looks like this:
/// <inheritdoc />
public override IMethodReturn Invoke(IMethodInvocation input, GetNextInterceptionBehaviorDelegate getNext)
var result = this.retryPolicy.ExecuteAsync<TResult>(
var innerResult = getNext()(input, getNext);
return innerResult.ReturnValue as Task<TResult>;
The problem is, the Invoke of the LogBehavior class is only hit the first time. I'd like to log each of the retries. Is this possible? The retry is working correctly as I see the service being hit several times as expected.