Message.WriteMessage 方法
定义
序列化整个消息。Serializes the entire message.
重载
| WriteMessage(XmlDictionaryWriter) |
使用指定的 XmlDictionaryWriter 序列化整个消息。Serializes the entire message using the specified XmlDictionaryWriter. |
| WriteMessage(XmlWriter) |
使用指定的 XmlWriter 序列化整个消息。Serializes the entire message using the specified XmlWriter. |
注解
此方法将对整个消息进行序列化。This method serializes the entire message. 除非针对消息存在 MessageBuffer,否则消息一经写入将无法重新写入。Once a message is written, it cannot be rewritten unless there is a MessageBuffer for the message.
WriteMessage(XmlDictionaryWriter)
使用指定的 XmlDictionaryWriter 序列化整个消息。Serializes the entire message using the specified XmlDictionaryWriter.
public:
void WriteMessage(System::Xml::XmlDictionaryWriter ^ writer);
public void WriteMessage (System.Xml.XmlDictionaryWriter writer);
member this.WriteMessage : System.Xml.XmlDictionaryWriter -> unit
Public Sub WriteMessage (writer As XmlDictionaryWriter)
参数
- writer
- XmlDictionaryWriter
一个要用于写入消息的 XmlDictionaryWriter 对象。An XmlDictionaryWriter object to be used to write the message.
例外
writer 为 null。writer is null.
消息已关闭。The message is closed.
已复制、读取或写入消息。The message has been copied, read or written.
注解
此方法将对整个消息进行序列化。This method serializes the entire message. 除非针对消息存在 MessageBuffer 实例,否则消息一经写入将无法重新写入。Once a message is written, it cannot be rewritten unless a MessageBuffer instance exists for the message.
适用于
WriteMessage(XmlWriter)
public:
void WriteMessage(System::Xml::XmlWriter ^ writer);
public void WriteMessage (System.Xml.XmlWriter writer);
member this.WriteMessage : System.Xml.XmlWriter -> unit
Public Sub WriteMessage (writer As XmlWriter)
参数
- writer
- XmlWriter
要用于写入整个消息的 XmlWriter 对象。The XmlWriter object to be used to write the entire message.
例外
writer 为 null。writer is null.
消息已关闭。The message is closed.
已复制、读取或写入消息。The message has been copied, read or written.
注解
此方法将对整个消息进行序列化。This method serializes the entire message. 除非针对消息存在 MessageBuffer,否则消息一经写入将无法重新写入。Once a message is written, it cannot be rewritten unless there is a MessageBuffer for the message.