PostSharp6.2/API Reference/Post­Sharp.​Aspects Namespace/ILocation­Interception­Args Interface/ILocation­Interception­Args Methods/ILocation­Interception­Args.​Execute(TPayload) Method

ILocationInterceptionArgs.Execute<TPayload> Method

Executes a delegate for the current LocationInterceptionArgs. This method allows to execute strongly-typed operations and avoid boxing required by the weakly typed ILocationInterceptionArgs interface.

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: 6.2.13.0 (6.2.13.0)
Syntax
C#
void Execute<TPayload>(
	ILocationInterceptionArgsAction<TPayload> action,
	ref TPayload payload
)

Parameters

action
Type: PostSharp.Aspects.ILocationInterceptionArgsAction<TPayload>
Class (typically a singleton) that contains the generic method Execute<TValue>(ILocationInterceptionArgs<TValue>, TPayload) that will be executed with the right method generic argument.
payload
Type: TPayload
An argument being passed to the Execute<TValue>(ILocationInterceptionArgs<TValue>, TPayload) method of the action parameter.

Type Parameters

TPayload
Type of the payload.
Remarks
Note Note

This method is ignored by the advice optimizer. As a result, the optimizer will not know that the action implementation uses any feature of the LocationInterceptionArgs object, and the code supporting these features won't be generated. If these features are required by action, they must be referenced inside the OnGetValue(LocationInterceptionArgs) or OnSetValue(LocationInterceptionArgs) method.

See Also