MessageEncoder::WriteMessage Method (Message^, Stream^)
.NET Framework (current version)
When overridden in a derived class, writes a message to a specified stream.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Parameters
- message
-
Type:
System.ServiceModel.Channels::Message^
The Message to write to the stream.
- stream
-
Type:
System.IO::Stream^
The Stream object to which the message is written.
This method throws a NotSupportedException on the .NET Compact Framework.
The following code shows how to implement the WriteMessage(Message^, Stream^) method.
public override void WriteMessage(Message message, Stream stream) { XmlWriter writer = XmlWriter.Create(stream, this.writerSettings); message.WriteMessage(writer); writer.Close(); }
Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: