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
Returns
- bool
trueif 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
Returns
- T
An object of
T.
ReadXml(XmlReader, Type)
Reads the XML representation of the objectType.
public override sealed object ReadXml(XmlReader reader, Type objectType)
Parameters
Returns
- object
An object of
objectType.
WriteXml(XmlWriter, object, XmlQualifiedEntity)
Writes the XML representation of the value.
public override sealed void WriteXml(XmlWriter writer, object value, XmlQualifiedEntity elementName = null)
Parameters
writerXmlWriterThe XmlWriter to write to.
valueobjectThe object to serialize.
elementNameXmlQualifiedEntityThe element name to encapsulate around
value.
WriteXml(XmlWriter, T, XmlQualifiedEntity)
Writes the XML representation of T.
public abstract void WriteXml(XmlWriter writer, T value, XmlQualifiedEntity elementName = null)
Parameters
writerXmlWriterThe XmlWriter to write to.
valueTThe object to serialize.
elementNameXmlQualifiedEntityThe element name to encapsulate around
value.