Proceed(IMethodInvocation, ExecuteHandler, ProceedHandler) Method

Definition

Namespace Stunts
Assembly Stunts.dll

Calls next and passes the settled attempt to callback. Synchronous members run the callback before this method returns. Task and value-task members return a new awaitable of the same type immediately; the callback runs when that attempt finishes.

public static IMethodReturn Proceed(this IMethodInvocation invocation, ExecuteHandler next, ProceedHandler callback)

Parameters

invocation
IMethodInvocation
callback
ProceedHandler

Returns

Remarks

The callback receives an again delegate that calls next once more and waits for that attempt. A synchronous member's callback must itself finish synchronously. Returning an exception fails the call. A synchronous failure is thrown by the stunt. A faulted task stays faulted, with the original exception, instead of throwing before a task is returned.