PostSharpAPI ReferencePost­Sharp.​AspectsIOn­State­Machine­Boundary­AspectOn­Resume
Open sandboxFocus

IOnStateMachineBoundaryAspect.OnResume Method


Method executed when a state machine resumes execution after a yield return or await statement.

void OnResume(MethodExecutionArgs args)
Type Name Description
MethodExecutionArgs args

Event arguments specifying which method is being executed and which are its arguments.


For iterator methods, this advice is executed before the MoveNext() method. However, the very first call of MoveNext() maps to OnEntry(MethodExecutionArgs).

In async methods, the advice is executed just after the state machine restarts execution after having waited as a result of the await statement.