SerializationContext Class
Defines the context of a serialization operation.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)
| Name | Description | |
|---|---|---|
![]() | SerializationContext(DomainXmlSerializerDirectory^) | Create a serialization context with no source/destination location information. |
![]() | SerializationContext(DomainXmlSerializerDirectory^, String^) | Create a serialization context with given source/destination location. |
![]() | SerializationContext(DomainXmlSerializerDirectory^, String^, SerializationResult^) | Create a serialization context with given source/destination location and SeralizationResult. |
| Name | Description | |
|---|---|---|
![]() | Directory | A serializer instance needs to look up for other serializer instances during serialization/deserialization, so this directory provides the lookup service. |
![]() | Item[String^] | Indexer to access properties stored in this context. The property name is compared by case-sensitive ordinal string comparison. If a property already exists in the context, setting it will override the old value with the new value. If a property doesn't exist in the context, getting it will return null, therefore setting a property to null will remove it from the context (i.e. null and non-existing values are not distinguishable). |
![]() | Location | In read operation, this is the source's location; in write operation, this is the destination location. Usually this is a file path, but it can be other format as well, depending on the underlying source/destination. It can be null as well if the location is not available, e.g. serializing to a string buffer. |
![]() | Result | This is the SerializationResult collected from all serializers participating in the current serialization operation. |
![]() | WriteOptionalPropertiesWithDefaultValue | Whether optional properties with default value should be written out during serialization. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | ToString() | (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | TransactionContextKey | Unique key used to identify SerializationContext instances in the TransactionContext property bag |
The context is passed to each participating serializer and provides information that can be used during serialization. The context also stores the results that are collected after serialization.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



