PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Weaver Namespace / Aspect­Weaver­Instance Class / Aspect­Weaver­Instance Methods / Aspect­Weaver­Instance.​Get­Configuration­Value(TConfiguration, TValue) Method

AspectWeaverInstance.GetConfigurationValue<TConfiguration, TValue> Method

Gets a value (i.e., value type) from the aspect configuration.

Namespace:  PostSharp.Sdk.AspectWeaver
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public TValue GetConfigurationValue<TConfiguration, TValue>(
	ConfigurationGetter<TConfiguration, Nullable<TValue>> getter,
	TValue defaultValue = null
)
where TConfiguration : AspectConfiguration
where TValue : struct, new()

Parameters

getter
Type: PostSharp.Sdk.AspectWeaver.ConfigurationGetter<TConfiguration, Nullable<TValue>>
Function (delegate) retrieving the value from a configuration element.
defaultValue (Optional)
Type: TValue
The default value of the configuration value, in case it is not defined.

Type Parameters

TConfiguration
Type of the aspect configuration.
TValue
Type of the retrieved aspect.

Return Value

Type: TValue
The configuration value, or the default value of TValue if no configuration element defined that property.
See Also