Table of Contents

Class XmlSerializer

Namespace
Cuemon.Xml.Serialization
Assembly
Cuemon.Xml.dll

Serializes and deserializes objects into and from the XML format.

public class XmlSerializer
Inheritance
XmlSerializer

Methods

Create(XmlSerializerOptions)

Creates a new XmlSerializer instance using the specified XmlSerializerOptions.

public static XmlSerializer Create(XmlSerializerOptions settings)

Parameters

settings XmlSerializerOptions

The settings to be applied to the XmlSerializer.

Returns

XmlSerializer

A new XmlSerializer instance using the specified XmlSerializerOptions.

Remarks

If settings is null, DefaultSettings is tried invoked. Otherwise, as a fallback, a default instance of XmlSerializerOptions is created.

Deserialize(Stream, Type)

Deserializes the specified value into an object of objectType.

public object Deserialize(Stream value, Type objectType)

Parameters

value Stream

The object to deserialize from XML format.

objectType Type

The type of the object to deserialize.

Returns

Object

An object of objectType.

Deserialize<T>(Stream)

Deserializes the specified value into an object of T.

public T Deserialize<T>(Stream value)

Parameters

value Stream

The object to deserialize from XML format.

Returns

T

An object of T.

Type Parameters

T

The type of the object to deserialize.

Serialize(Object, Type)

Serializes the specified value to a Stream.

public Stream Serialize(object value, Type objectType)

Parameters

value Object

The object to serialize to XML format.

objectType Type

The type of the object to serialize.

Returns

Stream

A stream of the serialized object.