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
- 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
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
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
XmlWriterThe XmlWriter to write to.
value
TThe object to serialize.
elementName
XmlQualifiedEntityThe 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
XmlWriterThe XmlWriter to write to.
value
ObjectThe object to serialize.
elementName
XmlQualifiedEntityThe element name to encapsulate around
value
.