[]
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.
public void Serialize(Stream stream, object o, XmlSerializerNamespaces namespaces, out XmlTextWriter writer)
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. |
Serializes the specified Object and writes the XML-document instance to a file using the specified Stream.
public void Serialize(Stream stream, object o, XmlSerializerNamespaces namespaces)
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 |
Serializes the specified Object and writes the XML-document instance to a file using the specified XmlWriter
public void Serialize(XmlTextWriter writer, object o, XmlSerializerNamespaces namespaces)
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 |
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.
public void Serialize(Stream stream, object o, MemberInfo mi, XmlSerializerNamespaces namespaces, out XmlTextWriter writer)
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. |
public void Serialize(Stream stream, object o, MemberInfo mi, XmlSerializerNamespaces namespaces, out XmlTextWriter writer, Attribute[] filter)
Type | Name | Description |
---|---|---|
Stream | stream | |
object | o | |
MemberInfo | mi | |
XmlSerializerNamespaces | namespaces | |
XmlTextWriter | writer | |
Attribute[] | filter |
Serializes the specified Object and writes the XML-document instance to a file using the specified Stream.
public void Serialize(Stream stream, object o, MemberInfo mi, XmlSerializerNamespaces namespaces)
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 |
Serializes the specified Object and writes the XML-document instance to a file using the specified XmlWriter
public void Serialize(XmlTextWriter writer, object o, MemberInfo mi, XmlSerializerNamespaces namespaces, Attribute[] filter)
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 |
Serializes the specified object to an XML formatted string.
public string Serialize(object o, MemberInfo mi, XmlSerializerNamespaces namespaces)
Type | Name | Description |
---|---|---|
object | o | |
MemberInfo | mi | |
XmlSerializerNamespaces | namespaces |
Type | Description |
---|---|
string |