PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / IAnnotation­Value Interface

IAnnotationValue Interface

Defines the semantics of a custom attribute value, i.e. basically a constructor, its arguments and other named arguments.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public interface IAnnotationValue

The IAnnotationValue type exposes the following members.

Properties
  NameDescription
Public propertyConstructor
Gets the custom attribute constructor.
Public propertyConstructorArguments
Gets the set of constructor arguments.
Public propertyNamedArguments
Gets the set of named arguments.
Methods
  NameDescription
Public methodTranslate
Translates the current annotation so that it is valid in another module.
Extension Methods
  NameDescription
Public Extension MethodConstructRuntimeObject()Overloaded.
Construct the instance (typically an object derived from Attribute) represented a given IAnnotationValue. This overload uses reflection to locate the constructor, and does not work if the target framework is not .NET Framework.
(Defined by CustomAttributeHelper.)
Public Extension MethodConstructRuntimeObject(Type)Overloaded.
Construct the instance represented by a given IAnnotationValue, given its type passed as an argument. This overload is safe even when the target framework is not .NET Framework.
(Defined by CustomAttributeHelper.)
Public Extension MethodConstructRuntimeObject(SerializedValueBindingOptions)Overloaded.
Construct the instance (typically an object derived from Attribute) represented a given IAnnotationValue, and specifies options. This overload uses reflection to locate the constructor, and does not work if the target framework is not .NET Framework.
(Defined by CustomAttributeHelper.)
Public Extension MethodConstructRuntimeObject(Type, SerializedValueBindingOptions)Overloaded.
Construct the instance represented by a given IAnnotationValue, given its type passed as an argument, and specifies options. This overload is safe even when the target framework is not .NET Framework.
(Defined by CustomAttributeHelper.)
Public Extension MethodConstructRuntimeObject<T>()Overloaded.
Construct the instance represented by a given IAnnotationValue, given its type passed as a generic argument. This overload is safe even when the target framework is not .NET Framework.
(Defined by CustomAttributeHelper.)
Public Extension MethodConstructRuntimeObject<T>(SerializedValueBindingOptions)Overloaded.
Construct the instance represented by a given IAnnotationValue, given its type passed as a generic argument, and specifies options. This overload is safe even when the target framework is not .NET Framework.
(Defined by CustomAttributeHelper.)
Public Extension MethodRender()Overloaded.
Renders a custom attribute value to a string.
(Defined by CustomAttributeHelper.)
Public Extension MethodRender(StringBuilder)Overloaded.
Renders a custom attribute value to an existing StringBuilder.
(Defined by CustomAttributeHelper.)
Public Extension MethodSetRuntimeObjectNamedArguments
Sets the fields and properties of an object (using reflection) given the named arguments of an IAnnotationValue.
(Defined by CustomAttributeHelper.)
Public Extension MethodToObjectConstruction
Converts an IAnnotationValue into an ObjectConstruction.
(Defined by AnnotationValueExtensions.)
See Also