-
Notifications
You must be signed in to change notification settings - Fork 47
API Overview
At the heart of ExtendedXmlSerializer's configuration sits a fluent API. Example:
IExtendedXmlSerializer serializer = new ConfigurationContainer()
.UseEncryptionAlgorithm(new CustomEncryption())
.Type<Person>() // Configuration of Person class
.Member(p => p.Password) // First member
.Name("P")
.Encrypt()
.Member(p => p.Name) // Second member
.Name("T")
.Type<TestClass>() // Configuration of another class
.CustomSerializer(new TestClassSerializer())
.Create();As such, there are three primary configuration components that you will work with to configure ExtendedXmlSerializer:
ConfigurationContainerTypeConfiguration<T>MemberConfiguration<T, TMember>
We start this API Overview by exploring these three configuration elements, then move onto other primary components used throughout ExtendedXmlSerializer.
The ConfigurationContainer is considered the root-level entry object in ExtendedXmlSerializer. All root serializers created in ExtendedXmlSerializer are done through a ConfigurationContainer after it has been created and configured.
Is is through the use of the ConfigurationContainer's Type<T> method call [link] that we are able to configure types, which we explore in the next section.
| [API Reference]
But first. :) A quick note about configuration profiles. Configuration containers can be configured via configuration profiles, which are pre-configured, encapsulated components that can be shared across projects that configure configuration containers in a particular away. You can see these in action here.
A type configuration is a root-level component in ExtendedXmlSerializer, and is accessed by calling the Type<T> method [link] on the ConfigurationContainer.
With a TypeConfiguration configuration object, a system is able to configure a type and how it is processed during the serialization and deserialization process. The system can further configure members of a type by calling their respective Member method [link] on the TypeConfiguration object. Doing so returns a MemberConfiguration object which we discuss next.
The member configuration is where configuration occurs for a type's member within a configuration container. Using this object, a system can configure how a type's member is serialized and deserialized during their respective processes.
Now that we have explored the configuration components, let's briefly dive into the other featured components used throughout ExtendedXmlSerializer.
TBD
TBD
TBD
TBD
TBD
ConfigurationContainerTypeConfigurationMemberConfigurationISerializerExtensionIContentsISerializerIConverterIElement