WriteMessage Method (XmlWriter)
Collapse the table of content
Expand the table of content

Message.WriteMessage Method (XmlWriter)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Serializes the entire message using the specified XmlWriter.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public void WriteMessage(
	XmlWriter writer
)

Parameters

writer
Type: System.Xml.XmlWriter
The XmlWriter object to be used to write the body of the message.

ExceptionCondition
ArgumentNullException

writer is null.

ObjectDisposedException

The message is closed.

InvalidOperationException

The message has been copied, read or written.

This method serializes the entire message. Once a message is written, it cannot be rewritten unless there is a MessageBuffer for the message.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft