Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BodyWriter::OnCreateBufferedCopy Method (Int32)

 

Provides an extensibility point when the body contents are written.

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

protected:
virtual BodyWriter^ OnCreateBufferedCopy(
	int maxBufferSize
)

Parameters

maxBufferSize
Type: System::Int32

The maximum size of the buffer for the body.

Return Value

Type: System.ServiceModel.Channels::BodyWriter^

The BodyWriter with the specified maximum buffer size.

A class derived from BodyWriter can override this method to create a buffered copy of the BodyWriter. But the default implementation of WriteBodyContents(XmlDictionaryWriter^) calls OnWriteBodyContents(XmlDictionaryWriter^), so overriding just OnWriteBodyContents(XmlDictionaryWriter^) should be easier and work for most scenarios.

Note that the BodyWriter returned must be buffered, that is IsBuffered must be true.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Return to top
Show:
© 2017 Microsoft