Table of Contents

Class XmlConverter<T>

Namespace
Cuemon.Xml.Serialization.Converters
Assembly
Cuemon.Xml.dll

Converts an object to or from XML.

public abstract class XmlConverter<T> : XmlConverter where T : class

Type Parameters

T
Inheritance
XmlConverter<T>
Derived
Inherited Members

Constructors

XmlConverter()

Initializes a new instance of the XmlConverter<T> class.

protected XmlConverter()

Methods

CanConvert(Type)

Determines whether this instance can convert the specified object type.

public override bool CanConvert(Type objectType)

Parameters

objectType Type

The Type of the object.

Returns

Boolean

true if this instance can convert the specified object type; otherwise, false.

ReadXml(Type, XmlReader)

Reads the XML representation of the objectType.

public abstract T ReadXml(Type objectType, XmlReader reader)

Parameters

objectType Type

The Type of the object.

reader XmlReader

The XmlReader to read from.

Returns

T

An object of T.

ReadXml(XmlReader, Type)

Reads the XML representation of the objectType.

public sealed override object ReadXml(XmlReader reader, Type objectType)

Parameters

reader XmlReader

The XmlReader to read from.

objectType Type

The Type of the object.

Returns

Object

An object of objectType.

WriteXml(XmlWriter, T, XmlQualifiedEntity)

Writes the XML representation of T.

public abstract void WriteXml(XmlWriter writer, T value, XmlQualifiedEntity elementName = null)

Parameters

writer XmlWriter

The XmlWriter to write to.

value T

The object to serialize.

elementName XmlQualifiedEntity

The element name to encapsulate around value.

WriteXml(XmlWriter, Object, XmlQualifiedEntity)

Writes the XML representation of the value.

public sealed override void WriteXml(XmlWriter writer, object value, XmlQualifiedEntity elementName = null)

Parameters

writer XmlWriter

The XmlWriter to write to.

value Object

The object to serialize.

elementName XmlQualifiedEntity

The element name to encapsulate around value.