Serialized values are a way to store values (integers, strings, arrays, ...) in binary modules.
Serialized values are used to define:
- Instances of custom attributes (CustomAttributeDeclaration).
- Instances of security attributes (
PermissionAttribute). - Default values of parameters (ParameterDeclaration.DefaultValue).
- Literal values of fields (FieldDefDeclaration.LiteralValue).
Implementation of serialized values
A serialized value, in PostSharp, always contains the type and the value in itself. The SerializedValue class encapsulates this combination of a type and a value. The SerializationType class is the base class for all types of serialization values. Specific implementation of types (intrinsic, arrays, enumerations, tagged objects) are defined in the PostSharp.CodeModel.SerializationTypes namespace.