Open sandboxFocus

Method Execute

Execute<TPayload>(ILocationInterceptionArgsAction<TPayload>, ref TPayload)

Executes a delegate for the current LocationInterceptionArgs. This method allows executing strongly typed operations and avoids the boxing required by the weakly typed ILocationInterceptionArgs interface.

Declaration
public abstract void Execute<TPayload>(ILocationInterceptionArgsAction<TPayload> action, ref TPayload payload)
Parameters
Type Name Description
ILocationInterceptionArgsAction<TPayload> action

Class (typically a singleton) that contains the generic method Execute<TValue>(ILocationInterceptionArgs<TValue>, ref TPayload) that is executed with the right method generic argument.

TPayload payload

The argument passed to the Execute<TValue>(ILocationInterceptionArgs<TValue>, ref TPayload) method of the action parameter.

Type Parameters
Name Description
TPayload

Type of the payload.

Implements
Remarks

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 will not be generated. If these features are required by action, they must be referenced inside the OnGetValue(LocationInterceptionArgs) or OnSetValue(LocationInterceptionArgs) method.