Open sandboxFocus

Method GetAspectConfiguration

GetAspectConfiguration(object)

Method invoked at build time to get the imperative configuration of the current Aspect.

Declaration
AspectConfiguration GetAspectConfiguration(object targetElement)
Parameters
Type Name Description
object targetElement

Code element (Assembly, Type, FieldInfo, MethodBase, PropertyInfo, EventInfo, ParameterInfo, or LocationInfo) to which the current aspect has been applied.

Returns
Type Description
AspectConfiguration

An AspectConfiguration representing the imperative configuration of the current Aspect.

Remarks

Aspects derived from Aspect implement this method by calling CreateAspectConfiguration() and SetAspectConfiguration(AspectConfiguration, object), which read the configuration methods and properties of the aspect class. An aspect that implements an aspect interface directly, without deriving from the corresponding aspect class, is configured either by implementing this method or by a configuration custom attribute applied to the aspect class, for instance OnExceptionAspectConfigurationAttribute.