PostSharpAPI ReferencePost­Sharp.​Patterns.​Dynamic­AdvisingDynamically­Advisable­ObjectExecute­With­Advices
Open sandboxFocus

DynamicallyAdvisableObject.ExecuteWithAdvices Method

ExecuteWithAdvices<TResult, TAction>(ObjectAccessLevel, ref TAction)

Executes an action wrapped by all custom advices added to the current object.

Declaration
protected TResult ExecuteWithAdvices<TResult, TAction>(ObjectAccessLevel objectAccessLevel, ref TAction action)
where TAction : struct, IAction<TResult>, ValueType
Parameters
Type Name Description
ObjectAccessLevel objectAccessLevel

Required access level when executing action.

TAction action

The action to be executed.

Returns
Type Description
TResult

The return value of action.

Type Parameters
Name Description
TResult

Type of return value.

TAction

Action type.