Class ExtensionMethodsForClassicSerialization
Extension methods that assist or enable functionality found within the extension model namespace for classic serialization (ExtendedXmlSerializer.ExtensionModel.Xml.Classic).
Inheritance
Inherited Members
Namespace: ExtendedXmlSerializer
Assembly: ExtendedXmlSerializer.dll
Syntax
public static class ExtensionMethodsForClassicSerialization
Methods
Context(XmlNameTable)
Used to create a System.Xml.XmlParserContext from an XmlNameTable.
Declaration
public static XmlParserContext Context(this XmlNameTable this)
Parameters
|
System.Xml.XmlNameTable
this
The XmlNameTable from which to create the context. |
Returns
|
System.Xml.XmlParserContext
The context. |
EnableClassicListNaming(IConfigurationContainer)
Enables ArrayOfT and ListOfT naming conventions for arrays and lists, respectively.
Declaration
public static IConfigurationContainer EnableClassicListNaming(this IConfigurationContainer this)
Parameters
|
IConfigurationContainer
this
The configuration container to configure. |
Returns
|
IConfigurationContainer
The configured configuration container. |
EnableClassicMode(IConfigurationContainer)
Applies the classic emit behavior (Classic) and processes lists and dictionaries without members. That is, if your list or dictionary is extended with its own properties and members, they will not be serialized nor deserialized if applied in the document.
Declaration
public static IConfigurationContainer EnableClassicMode(this IConfigurationContainer this)
Parameters
|
IConfigurationContainer
this
The configuration container to configure. |
Returns
|
IConfigurationContainer
The configured configuration container. |
EnableClassicSchemaTyping(IConfigurationContainer)
Enables the xsi:type for classic deserialization purposes. This will be used to resolve types during the serialization process if no other type resolution mechanisms are successful in resolving a type.
Declaration
public static IConfigurationContainer EnableClassicSchemaTyping(this IConfigurationContainer this)
Parameters
|
IConfigurationContainer
this
The configuration container to configure. |
Returns
|
IConfigurationContainer
The configured configuration container. |
See Also
EnableXmlText(IConfigurationContainer)
Adds basic support for the System.Xml.Serialization.XmlTextAttribute. Note that this is not a very robust solution and there are deficiencies in the fidelity with the classic serializer's implementation. Use with care, and make a wish. 😆
Declaration
public static IConfigurationContainer EnableXmlText(this IConfigurationContainer this)
Parameters
|
IConfigurationContainer
this
The configuration container to configure. |
Returns
|
IConfigurationContainer
The configured configuration container. |
See Also
InspectingType<T>(IConfigurationContainer)
Used to inspect a type for an System.Xml.Serialization.XmlRootAttribute and if not found, a System.Xml.Serialization.XmlTypeAttribute to establish its identity. If both are found, the System.Xml.Serialization.XmlRootAttribute takes precedence, but if any values there are empty or null, the System.Xml.Serialization.XmlTypeAttribute values will be used, instead. Using such an approach, you can use an URI -- either System.Xml.Serialization.XmlRootAttribute.Namespace or System.Xml.Serialization.XmlTypeAttribute.Namespace -- to specify the type's namespace and the entity's name by using System.Xml.Serialization.XmlRootAttribute.ElementName or System.Xml.Serialization.XmlTypeAttribute.TypeName) for the that value. If no name value is found on either, the type's name will be used instead.
Declaration
public static IConfigurationContainer InspectingType<T>(this IConfigurationContainer this)
Parameters
|
IConfigurationContainer
this
The configuration container to configure. |
Returns
|
IConfigurationContainer
The configured configuration container. |
Type Parameters
|
T
The subject type to inspect. |
See Also
InspectingTypes(IConfigurationContainer, IEnumerable<Type>)
Inspects a collection of types to inspect for their identities. This is done by querying the existence of an System.Xml.Serialization.XmlRootAttribute on each type, and if not found, a System.Xml.Serialization.XmlTypeAttribute to establish its identity. If both are found, the System.Xml.Serialization.XmlRootAttribute takes precedence, but if any values there are empty or null, the System.Xml.Serialization.XmlTypeAttribute values will be used, instead. Using such an approach, you can use an URI -- either System.Xml.Serialization.XmlRootAttribute.Namespace or System.Xml.Serialization.XmlTypeAttribute.Namespace -- to specify the type's namespace and the entity's name by using System.Xml.Serialization.XmlRootAttribute.ElementName or System.Xml.Serialization.XmlTypeAttribute.TypeName) for the that value. If no name value is found on either, the type's name will be used instead.
Declaration
public static IConfigurationContainer InspectingTypes(this IConfigurationContainer this, IEnumerable<Type> types)
Parameters
|
IConfigurationContainer
this
The configuration container to configure. |
|
System.Collections.Generic.IEnumerable<System.Type>
types
The list of types to inspect. |
Returns
|
IConfigurationContainer
The configured configuration container. |
See Also
Member(XElement, String)
Convenience method to retrieve a member element from a provided System.Xml.Linq.XElement.
Declaration
public static XElement Member(this XElement this, string name)
Parameters
|
System.Xml.Linq.XElement
this
The provided XElement to query. |
|
System.String
name
The member name used to query the provided XElement. |
Returns
|
System.Xml.Linq.XElement
The located XElement |