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.10.0 (6.10.10.0)
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: TValueThe configuration value, or the default value of TValue if no configuration element defined that property.