Execute<TPayload>(ILocationInterceptionArgsAction<TPayload>, ref TPayload)
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.
Declaration
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 will be executed with the right method generic argument. |
TPayload | payload | An argument being passed to the Execute<TValue>(ILocationInterceptionArgs<TValue>, ref TPayload) method of the |
Type Parameters
Name | Description |
---|---|
TPayload | Type of the payload. |
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 won't be generated. If these features are required
by action
, they must be referenced inside the OnGetValue(LocationInterceptionArgs) or OnSetValue(LocationInterceptionArgs)
method.