Class XmlFormatter
Serializes and deserializes an object in XML format.
Namespace: Cuemon.Serialization.Xml.Formatters
Assembly: Cuemon.Serialization.Xml.dll
Syntax
public class XmlFormatter : Formatter<Stream>
Constructors
| Improve this DocXmlFormatter()
Initializes a new instance of the XmlFormatter class.
Declaration
public XmlFormatter()
XmlFormatter(XmlFormatterOptions)
Initializes a new instance of the XmlFormatter class.
Declaration
public XmlFormatter(XmlFormatterOptions options)
Parameters
Type | Name | Description |
---|---|---|
XmlFormatterOptions | options | The configured XmlFormatterOptions. |
XmlFormatter(Action<XmlFormatterOptions>)
Initializes a new instance of the XmlFormatter class.
Declaration
public XmlFormatter(Action<XmlFormatterOptions> setup)
Parameters
Type | Name | Description |
---|---|---|
System.Action<XmlFormatterOptions> | setup | The XmlFormatterOptions which need to be configured. |
Properties
| Improve this DocOptions
Gets the configured options of this XmlFormatter.
Declaration
protected XmlFormatterOptions Options { get; }
Property Value
Type | Description |
---|---|
XmlFormatterOptions | The configured options of this XmlFormatter. |
Methods
| Improve this DocDeserialize(Stream, Type)
Deserializes the specified value
into an object of objectType
.
Declaration
public override object Deserialize(Stream value, Type objectType)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | value | The stream from which to deserialize the object graph. |
System.Type | objectType | The type of the deserialized object. |
Returns
Type | Description |
---|---|
System.Object | An object of |
Overrides
Cuemon.Serialization.Formatters.Formatter<System.IO.Stream>.Deserialize(System.IO.Stream, System.Type)
|
Improve this Doc
Serialize(Object, Type)
Serializes the specified source
to an object of System.IO.Stream.
Declaration
public override Stream Serialize(object source, Type objectType)
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | The object to serialize to XML format. |
System.Type | objectType | The type of the object to serialize. |
Returns
Type | Description |
---|---|
System.IO.Stream | A stream of the serialized |
Overrides
Cuemon.Serialization.Formatters.Formatter<System.IO.Stream>.Serialize(System.Object, System.Type)
Extension Methods
See Also
Formatter<TFormat>