Class XmlSerializer
Serializes and deserializes objects into and from the XML format.
Inheritance
Namespace: Cuemon.Serialization.Xml
Assembly: Cuemon.Serialization.Xml.dll
Syntax
public class XmlSerializer
Methods
| Improve this DocCreate(XmlSerializerSettings)
Creates a new Xml
Declaration
public static XmlSerializer Create(XmlSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Xml |
settings | The settings to be applied to the Xml |
Returns
Type | Description |
---|---|
Xml |
A new Xml |
Remarks
If settings
is null
, Default
Deserialize(Stream, Type)
Deserializes the specified value
into an object of objectType
.
Declaration
public object Deserialize(Stream value, Type objectType)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to deserialize from XML format. |
System. |
objectType | The type of the object to deserialize. |
Returns
Type | Description |
---|---|
System. |
An object of |
Deserialize<T>(Stream)
Deserializes the specified value
into an object of T
.
Declaration
public T Deserialize<T>(Stream value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to deserialize from XML format. |
Returns
Type | Description |
---|---|
T | An object of |
Type Parameters
Name | Description |
---|---|
T | The type of the object to deserialize. |
Serialize(Object, Type)
Serializes the specified value
to a System.
Declaration
public Stream Serialize(object value, Type objectType)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize to XML format. |
System. |
objectType | The type of the object to serialize. |
Returns
Type | Description |
---|---|
System. |
A stream of the serialized object. |