Aracılığıyla paylaş


BodyWriter.WriteBodyContents(XmlDictionaryWriter) Yöntem

Tanım

İleti gövdesinin içeriğini yazar.

public:
 void WriteBodyContents(System::Xml::XmlDictionaryWriter ^ writer);
public void WriteBodyContents (System.Xml.XmlDictionaryWriter writer);
member this.WriteBodyContents : System.Xml.XmlDictionaryWriter -> unit
Public Sub WriteBodyContents (writer As XmlDictionaryWriter)

Parametreler

writer
XmlDictionaryWriter

İleti XmlDictionaryWriter gövdesini yazmak için kullanılır.

Özel durumlar

writer, null değeridir.

Örnekler

Aşağıdaki örnekte yönteminin nasıl çağrılacakları gösterilmektedir WriteBodyContents(XmlDictionaryWriter) .

string[] strings = {"Hello", "world"};
MyBodyWriter bw = new MyBodyWriter(strings);

StringBuilder strBuilder = new StringBuilder(10);
XmlWriter writer = XmlWriter.Create(strBuilder);
XmlDictionaryWriter dictionaryWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer);

bw.WriteBodyContents(dictionaryWriter);
dictionaryWriter.Flush();
Dim strings() As String = {"Hello", "world"}
Dim bw As New MyBodyWriter(strings)

Dim strBuilder As New StringBuilder(10)
Dim writer = XmlWriter.Create(strBuilder)
Dim dictionaryWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer)

bw.WriteBodyContents(dictionaryWriter)
dictionaryWriter.Flush()

Açıklamalar

çağrısının WriteBodyContents(XmlDictionaryWriter)OnWriteBodyContents(XmlDictionaryWriter)varsayılan uygulaması, bu nedenle geçersiz kılma OnWriteBodyContents(XmlDictionaryWriter) en iyi uzantı noktasını sağlar.

Şunlara uygulanır