DomainXmlSerializerDirectory Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class is meant to be used at runtime to combine all XmlSerializationBehaviors and xml namespaces from different DomainModels together. Typically, a user will choose more than one models (e.g. one for in-memory model and one for presentation elements). Each model will need an associated behavior to get serialized/deserialized properly. Since relationships can connect model elements across domains, it is necessary to have a single lookup that maps all used DomainClasses to their serializers.
public ref class DomainXmlSerializerDirectory sealed
public sealed class DomainXmlSerializerDirectory
type DomainXmlSerializerDirectory = class
Public NotInheritable Class DomainXmlSerializerDirectory
- Inheritance
-
DomainXmlSerializerDirectory
Constructors
DomainXmlSerializerDirectory() |
Creates a new dictionary with no entries. The entries can be added later by calling AddBehavior() method. |
DomainXmlSerializerDirectory(DomainXmlSerializationBehavior[]) |
Creates a new dictionary containing entries from the given serialization behaviors. Just a short-cut for creating an empty one and calling AddBehavior() afterwards. |
Properties
Namespaces |
Returns the list of namespaces mapped to domain model types |
Methods
AddBehavior(DomainXmlSerializationBehavior) |
Add a serialization behavior to this dictionary, which means adding all mapping entries defined in the behavior, which maps DomainClass Id to corresponding serializer. |
GetPropertySerializer(Type) |
Get the DomainPropertyXmlSerializer instance for the given property type. |
GetSerializer(Guid) |
Get the DomainClassXmlSerializer instance for the given DomainClass Id. |