System.ServiceModel
4.0.0.0
System.Object
A message consists of headers and a body. The headers are buffered and the body is streamed. Because the body is streamed, the user cannot pass the actual content of the body to a message. Instead the user must pass a class that knows how to write the body when asked to do so. This is done by passing a class derived from to the . A message calls the class derived from whenever it requires the body to be written using an .
Represents the writer of the message body.
Constructor
4.0.0.0
If is false then the message calls the write method once and buffers the contents.
Initializes a new instance of the class that explicitly indicates whether to buffer.
true if the body writer can be called multiple times; otherwise false.
Method
4.0.0.0
System.ServiceModel.Channels.BodyWriter
If is true then the object is returned. If is false then the contents of the up to is returned. This also calls as an extensibility point.
Creates a buffered copy of the body.
A that contains a copy of this object.
The maximum size of the buffer for the body.
Property
4.0.0.0
System.Boolean
To be added.
If is false then the message calls the write method once and buffers the contents.
Gets a value that indicates whether the write method can be called multiple times.
Method
4.0.0.0
System.ServiceModel.Channels.BodyWriter
A class derived from can override this method to create a buffered copy of the . But the default implementation of calls , so overriding just should be easier and work for most scenarios.
Note that the returned must be buffered, that is must be true.
Provides an extensibility point when the body contents are written.
The with the specified maximum buffer size.
The maximum size of the buffer for the body.
Method
4.0.0.0
System.Void
This method must be implemented by classes derived from . This is the key method that writes the body. If the is buffered then this method is called only once.
When implemented, provides an extensibility point when the body contents are written.
The used to write out the message body.
Method
4.0.0.0
System.Void
The default implementation of calls , so overriding provides the best point of extension.
Writes out the contents of the message body.
The used to write out the message body.