PostSharp.ILAPI ReferencePost­Sharp.​AspectsOn­Method­Boundary­AspectOn­Yield
Open sandboxFocus

OnMethodBoundaryAspect.OnYield Method

OnYield(MethodExecutionArgs)

Method executed when a state machine yields, as the result of a yield return or await statement.

Declaration
[MethodExecutionAdviceOptimization]
[RequiresMethodExecutionAdviceAnalysis]
[RequiresDebuggerEnhancement]
[HasInheritedAttribute]
public virtual void OnYield(MethodExecutionArgs args)
Parameters
Type Name Description
MethodExecutionArgs args

Event arguments specifying which method is being executed and which are its arguments. In iterator methods, the YieldValue property gives access to the operand of the yield return statement.

Implements
IOnStateMachineBoundaryAspect.OnYield(MethodExecutionArgs)