共用方式為


BodyWriter.OnCreateBufferedCopy(Int32) 方法

定義

提供寫入本文內容時的擴充點。

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

參數

maxBufferSize
Int32

本文緩衝區的大小上限。

傳回

具有指定之緩衝區大小上限的 BodyWriter

備註

衍生自 BodyWriter 的類別可以覆寫這個方法,以建立 BodyWriter 的緩衝處理複本。 但是,WriteBodyContents(XmlDictionaryWriter) 的預設實作會呼叫 OnWriteBodyContents(XmlDictionaryWriter),所以在大部分情況下,只覆寫 OnWriteBodyContents(XmlDictionaryWriter) 應該比較容易且有效。

請注意,傳回的 BodyWriter 必須進行緩衝處理,也就是 IsBuffered 必須為 true

適用於