Skip to content

API Overview

Mike-EEE edited this page Nov 30, 2019 · 19 revisions

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:

  • ConfigurationContainer
  • TypeConfiguration<T>
  • MemberConfiguration<T, TMember>

We start this API Overview by exploring these three configuration elements, then move onto other primary components used throughout ExtendedXmlSerializer.

ConfigurationContainer

[API Reference]

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.

Configuration Profiles

| [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.

TypeConfiguration

[API Reference]

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.

MemberConfiguration

[API Reference]

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.

Application Components

Now that we have explored the configuration components, let's briefly dive into the other featured components used throughout ExtendedXmlSerializer.

ISerializer

[API Reference]

TBD

IElement

[API Reference]

TBD

IContents

[API Reference]

TBD

IConverter

[API Reference]

TBD

ISerializerExtension

[API Reference]

TBD

Clone this wiki locally