[]
        
(Showing Draft Content)

C1.Win.TrueDBGrid.Util.Xml.Serialization.Serializer.Serialize

Serialize Method

Serialize(Stream, object, XmlSerializerNamespaces, out XmlTextWriter)

Serializes the specified Object and writes the XML-document instance to a file using the specified Stream. DOES NOT close the underlying stream. Useful for copying objects. Caller is responsible to call out writer.Close() to close writer and underlying stream.

Declaration
public void Serialize(Stream stream, object o, XmlSerializerNamespaces namespaces, out XmlTextWriter writer)
Parameters
Type Name Description
Stream stream

The Stream used to write the XML-document instance

object o

The Object to serialize

XmlSerializerNamespaces namespaces

The XmlSerializerNamespaces referenced by the object

XmlTextWriter writer

The XmlWriter object reference. Call writer.Close after working with stream/writer.

Serialize(Stream, object, XmlSerializerNamespaces)

Serializes the specified Object and writes the XML-document instance to a file using the specified Stream.

Declaration
public void Serialize(Stream stream, object o, XmlSerializerNamespaces namespaces)
Parameters
Type Name Description
Stream stream

The Stream used to write the XML-document instance

object o

The Object to serialize

XmlSerializerNamespaces namespaces

The XmlSerializerNamespaces referenced by the object

Serialize(XmlTextWriter, object, XmlSerializerNamespaces)

Serializes the specified Object and writes the XML-document instance to a file using the specified XmlWriter

Declaration
public void Serialize(XmlTextWriter writer, object o, XmlSerializerNamespaces namespaces)
Parameters
Type Name Description
XmlTextWriter writer

The XmlWriter used to write the XML-document instance

object o

The Object to serialize

XmlSerializerNamespaces namespaces

The XmlSerializerNamespaces referenced by the object

Serialize(Stream, object, MemberInfo, XmlSerializerNamespaces, out XmlTextWriter)

Serializes the specified Object and writes the XML-document instance to a file using the specified Stream. DOES NOT close the underlying stream. Useful for copying objects. Caller is responsible to call out writer.Close() to close writer and underlying stream.

Declaration
public void Serialize(Stream stream, object o, MemberInfo mi, XmlSerializerNamespaces namespaces, out XmlTextWriter writer)
Parameters
Type Name Description
Stream stream

The Stream used to write the XML-document instance

object o

The Object to serialize

MemberInfo mi

The FieldInfo or MemberInfo object context for the object to serialize

XmlSerializerNamespaces namespaces

The XmlSerializerNamespaces referenced by the object

XmlTextWriter writer

The XmlWriter object reference. Call writer.Close after working with stream/writer.

Serialize(Stream, object, MemberInfo, XmlSerializerNamespaces, out XmlTextWriter, Attribute[])

Declaration
public void Serialize(Stream stream, object o, MemberInfo mi, XmlSerializerNamespaces namespaces, out XmlTextWriter writer, Attribute[] filter)
Parameters
Type Name Description
Stream stream
object o
MemberInfo mi
XmlSerializerNamespaces namespaces
XmlTextWriter writer
Attribute[] filter

Serialize(Stream, object, MemberInfo, XmlSerializerNamespaces)

Serializes the specified Object and writes the XML-document instance to a file using the specified Stream.

Declaration
public void Serialize(Stream stream, object o, MemberInfo mi, XmlSerializerNamespaces namespaces)
Parameters
Type Name Description
Stream stream

The Stream used to write the XML-document instance

object o

The Object to serialize

MemberInfo mi

The FieldInfo or MemberInfo object context for the object to serialize

XmlSerializerNamespaces namespaces

The XmlSerializerNamespaces referenced by the object

Serialize(XmlTextWriter, object, MemberInfo, XmlSerializerNamespaces, Attribute[])

Serializes the specified Object and writes the XML-document instance to a file using the specified XmlWriter

Declaration
public void Serialize(XmlTextWriter writer, object o, MemberInfo mi, XmlSerializerNamespaces namespaces, Attribute[] filter)
Parameters
Type Name Description
XmlTextWriter writer

The XmlWriter used to write the XML-document instance

object o

The Object to serialize

MemberInfo mi

The FieldInfo or MemberInfo object context for the object to serialize

XmlSerializerNamespaces namespaces

The XmlSerializerNamespaces referenced by the object

Attribute[] filter

Array of attributes that specify what to serialize

Serialize(object, MemberInfo, XmlSerializerNamespaces)

Serializes the specified object to an XML formatted string.

Declaration
public string Serialize(object o, MemberInfo mi, XmlSerializerNamespaces namespaces)
Parameters
Type Name Description
object o
MemberInfo mi
XmlSerializerNamespaces namespaces
Returns
Type Description
string