共用方式為


XmlDictionaryWriter.CreateMtomWriter 方法

定義

建立 XmlDictionaryWriter 的執行個體,這個執行個體會使用訊息傳輸最佳化機制 (MTOM) 格式寫入 XML。

多載

CreateMtomWriter(Stream, Encoding, Int32, String)

建立採用 MTOM 格式寫入 XML 的 XmlDictionaryWriter 執行個體。

CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean)

建立採用 MTOM 格式寫入 XML 的 XmlDictionaryWriter 執行個體。

備註

MTOM 可讓使用者最佳化 SOAP 訊息內之原始二進位資料的傳輸。

CreateMtomWriter(Stream, Encoding, Int32, String)

建立採用 MTOM 格式寫入 XML 的 XmlDictionaryWriter 執行個體。

public:
 static System::Xml::XmlDictionaryWriter ^ CreateMtomWriter(System::IO::Stream ^ stream, System::Text::Encoding ^ encoding, int maxSizeInBytes, System::String ^ startInfo);
public static System.Xml.XmlDictionaryWriter CreateMtomWriter (System.IO.Stream stream, System.Text.Encoding encoding, int maxSizeInBytes, string startInfo);
static member CreateMtomWriter : System.IO.Stream * System.Text.Encoding * int * string -> System.Xml.XmlDictionaryWriter
Public Shared Function CreateMtomWriter (stream As Stream, encoding As Encoding, maxSizeInBytes As Integer, startInfo As String) As XmlDictionaryWriter

參數

stream
Stream

要寫入的資料流。

encoding
Encoding

資料流的字元編碼。

maxSizeInBytes
Int32

在寫入器內緩衝處理的位元組數目上限。

startInfo
String

ContentType SOAP 標頭中的屬性。

傳回

XmlDictionaryWriter

XmlDictionaryWriter 的執行個體。

適用於

CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean)

建立採用 MTOM 格式寫入 XML 的 XmlDictionaryWriter 執行個體。

public:
 static System::Xml::XmlDictionaryWriter ^ CreateMtomWriter(System::IO::Stream ^ stream, System::Text::Encoding ^ encoding, int maxSizeInBytes, System::String ^ startInfo, System::String ^ boundary, System::String ^ startUri, bool writeMessageHeaders, bool ownsStream);
public static System.Xml.XmlDictionaryWriter CreateMtomWriter (System.IO.Stream stream, System.Text.Encoding encoding, int maxSizeInBytes, string startInfo, string? boundary, string? startUri, bool writeMessageHeaders, bool ownsStream);
public static System.Xml.XmlDictionaryWriter CreateMtomWriter (System.IO.Stream stream, System.Text.Encoding encoding, int maxSizeInBytes, string startInfo, string boundary, string startUri, bool writeMessageHeaders, bool ownsStream);
static member CreateMtomWriter : System.IO.Stream * System.Text.Encoding * int * string * string * string * bool * bool -> System.Xml.XmlDictionaryWriter
Public Shared Function CreateMtomWriter (stream As Stream, encoding As Encoding, maxSizeInBytes As Integer, startInfo As String, boundary As String, startUri As String, writeMessageHeaders As Boolean, ownsStream As Boolean) As XmlDictionaryWriter

參數

stream
Stream

要寫入的資料流。

encoding
Encoding

資料流的字元編碼。

maxSizeInBytes
Int32

在寫入器內緩衝處理的位元組數目上限。

startInfo
String

包含 Infoset 之 MIME 部分的 Content-Type。

boundary
String

訊息中的 MIME 界限。

startUri
String

包含 Infoset 之 MIME 部分的 Content-ID URI。

writeMessageHeaders
Boolean

true 表示寫入訊息標頭。

ownsStream
Boolean

true 表示寫入器會在完成時關閉資料流;否則為 false

傳回

XmlDictionaryWriter

XmlDictionaryWriter 的執行個體。

適用於