XmlDictionaryWriter.CreateMtomWriter 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建在消息传输优化机制 (MTOM) 格式中编写 XML 的 XmlDictionaryWriter 实例。
重载
CreateMtomWriter(Stream, Encoding, Int32, String) |
创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。 |
CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean) |
创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。 |
注解
MTOM 允许用户优化 SOAP 消息内的原始二进制数据的传输。
CreateMtomWriter(Stream, Encoding, Int32, String)
创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。
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 的一个实例。
适用于
CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean)
创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。
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 部分的内容类型。
- boundary
- String
消息中的 MIME 边界。
- startUri
- String
包含 Infoset 的 MIME 部分的内容 ID URI。
- writeMessageHeaders
- Boolean
如果写入消息标头,则为 true
。
- ownsStream
- Boolean
如果指示完成时编写器关闭流,则为 true
;否则为 false
。
返回
XmlDictionaryWriter 的一个实例。