PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Dynamic­Advising Namespace / IExecute­Action­Dynamic­Advice Interface / IExecute­Action­Dynamic­Advice Methods / IExecute­Action­Dynamic­Advice.​Invoke(TResult, TAction) Method

IExecuteActionDynamicAdvice.Invoke<TResult, TAction> Method

Invokes the advice or the underlying method.

Namespace:  PostSharp.Patterns.DynamicAdvising
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.9.1.0 (6.9.1.0)
Syntax
C#
TResult Invoke<TResult, TAction>(
	ObjectAccessLevel objectAccessLevel,
	AdviceEnumerator<IExecuteActionDynamicAdvice> nextAdvice,
	ref TAction action
)
where TAction : struct, new(), IAction<TResult>

Parameters

objectAccessLevel
Type: PostSharp.Patterns.Model.ObjectAccessLevel
The ObjectAccessLevel required by the action.
nextAdvice
Type: PostSharp.Patterns.DynamicAdvising.AdviceEnumerator<IExecuteActionDynamicAdvice>
Next advice.
action
Type: TAction
The action to be executed.

Type Parameters

TResult
Type of the method result.
TAction
Type of the action.

Return Value

Type: TResult
The result of the underlying advice.
See Also