BodyWriter.OnCreateBufferedCopy(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides an extensibility point when the body contents are written.
protected:
virtual System::ServiceModel::Channels::BodyWriter ^ OnCreateBufferedCopy(int maxBufferSize);
protected virtual System.ServiceModel.Channels.BodyWriter OnCreateBufferedCopy (int maxBufferSize);
abstract member OnCreateBufferedCopy : int -> System.ServiceModel.Channels.BodyWriter
override this.OnCreateBufferedCopy : int -> System.ServiceModel.Channels.BodyWriter
Protected Overridable Function OnCreateBufferedCopy (maxBufferSize As Integer) As BodyWriter
Parameters
- maxBufferSize
- Int32
The maximum size of the buffer for the body.
Returns
The BodyWriter with the specified maximum buffer size.
Remarks
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
.