BodyWriter Class
TOC
Collapse the table of content
Expand the table of content

BodyWriter Class

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

Represents the writer of the message body.

System::Object
  System.ServiceModel.Channels::BodyWriter

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

No code example is currently available or this language may not be supported.

The BodyWriter type exposes the following members.

  NameDescription
Protected methodBodyWriterInitializes a new instance of the BodyWriter class that explicitly indicates whether to buffer.
Top

  NameDescription
Public propertyIsBufferedGets a value that indicates whether the write method can be called multiple times.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnWriteBodyContentsWhen implemented, provides an extensibility point when the body contents are written.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWriteBodyContentsWrites out the contents of the message body.
Top

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 required to do so. This is done by passing a class derived from BodyWriter to the Message. A message calls the class derived from BodyWriter whenever it requires the body to be written using an XmlWriter.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2017 Microsoft