Class XmlConverter
- Namespace
- Cuemon.Xml.Serialization.Converters
- Assembly
- Cuemon.Xml.dll
Converts an object to or from XML.
public abstract class XmlConverter
- Inheritance
-
XmlConverter
- Derived
Constructors
XmlConverter()
Initializes a new instance of the XmlConverter class.
protected XmlConverter()
Properties
CanRead
Gets a value indicating whether this XmlConverter can read XML.
public virtual bool CanRead { get; }
Property Value
- Boolean
true
if this XmlConverter can read XML; otherwise,false
.
CanWrite
Gets a value indicating whether this XmlConverter can write XML.
public virtual bool CanWrite { get; }
Property Value
- Boolean
true
if this XmlConverter can write XML; otherwise,false
.
Methods
CanConvert(Type)
Determines whether this instance can convert the specified object type.
public abstract bool CanConvert(Type objectType)
Parameters
Returns
- Boolean
true
if this instance can convert the specified object type; otherwise,false
.
ReadXml(XmlReader, Type)
Reads the XML representation of the objectType
.
public abstract 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 abstract 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
.