Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Model Namespace / Dynamically­Advisable­Object Class / Dynamically­Advisable­Object Methods / Dynamically­Advisable­Object.​Execute­With­Advices(TResult, TAction) Method

DynamicallyAdvisableObject.ExecuteWithAdvices<TResult, TAction> Method

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

Namespace:  PostSharp.Patterns.Model
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.43.0 (5.0.43.0)
Syntax
C#
protected TResult ExecuteWithAdvices<TResult, TAction>(
	ObjectAccessLevel objectAccessLevel,
	ref TAction action
)
where TAction : struct, new(), IInvocable<TResult>

Parameters

objectAccessLevel
Type: PostSharp.Patterns.Model.ObjectAccessLevel
Required access level when executing action.
action
Type: TAction
The action to be executed.

Type Parameters

TResult
Type of return value.
TAction
Action type.

Return Value

Type: TResult
The return value of action.
See Also