Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects Namespace / On­Method­Boundary­Aspect Class / On­Method­Boundary­Aspect Methods / On­Method­Boundary­Aspect.​On­Resume Method

OnMethodBoundaryAspect.OnResume Method

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

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: 5.0.51.0 (5.0.51.0)
Syntax
C#
public virtual void OnResume(
	MethodExecutionArgs args
)

Parameters

args
Type: PostSharp.Aspects.MethodExecutionArgs
Event arguments specifying which method is being executed and which are its arguments.

Implements

IOnStateMachineBoundaryAspect.OnResume(MethodExecutionArgs)
Remarks

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.

See Also