MtomMessageEncodingBindingElement 類別

定義

繫結項目,這個繫結項目會指定用於訊息傳輸最佳化機制 (Message Transmission Optimization Mechanism,MTOM) 訊息的編碼和版本控制。The binding element that specifies the encoding and versioning used for Message Transmission Optimization Mechanism (MTOM) messages.

public ref class MtomMessageEncodingBindingElement sealed : System::ServiceModel::Channels::MessageEncodingBindingElement, System::ServiceModel::Description::IPolicyExportExtension, System::ServiceModel::Description::IWsdlExportExtension
public sealed class MtomMessageEncodingBindingElement : System.ServiceModel.Channels.MessageEncodingBindingElement, System.ServiceModel.Description.IPolicyExportExtension, System.ServiceModel.Description.IWsdlExportExtension
type MtomMessageEncodingBindingElement = class
    inherit MessageEncodingBindingElement
    interface IWsdlExportExtension
    interface IPolicyExportExtension
Public NotInheritable Class MtomMessageEncodingBindingElement
Inherits MessageEncodingBindingElement
Implements IPolicyExportExtension, IWsdlExportExtension
繼承
MtomMessageEncodingBindingElement
實作

備註

編碼是將訊息轉換成位元組序列的處理序,Encoding is the process of transforming a message into a sequence of bytes. 解碼則是相反的處理序。Decoding is the reverse process. Windows Communication Foundation (WCF) 包含 SOAP 訊息的三種編碼類型:文字、二進位和訊息傳輸最佳化機制 (MTOM)。Windows Communication Foundation (WCF) includes three types of encoding for SOAP messages: Text, Binary and Message Transmission Optimization Mechanism (MTOM).

MtomMessageEncodingBindingElement 表示繫結項目,可指定用於使用訊息傳輸最佳化機制 (MTOM) 編碼之訊息的字元編碼、訊息版本控制以及其他設定。The MtomMessageEncodingBindingElement represents the binding element that specifies the character encoding and message versioning and other settings used for messages using a Message Transmission Optimization Mechanism (MTOM) encoding. MTOM 是在 WCF 訊息中傳輸二進位資料的有效技術。MTOM is an efficient technology for transmitting binary data in WCF messages. MTOM 編碼器會嘗試在效率和互通性之間建立平衡。The MTOM encoder attempts to create a balance between efficiency and interoperability. MTOM 編碼會以文字格式傳輸大部分的 XML,但是在傳輸大型區塊的二進位資料時,會依照原狀來傳送 (不轉換成其 base64 編碼格式),好讓這些資料最佳化。The MTOM encoding transmits most XML in textual form, but optimizes large blocks of binary data by transmitting them as-is, without conversion to their base64 encoded format.

如需有關指定訊息是使用 XML 的文字標記法來編碼之繫結項目的詳細資訊, TextMessageEncodingBindingElement請參閱。For more information about the binding element that specifies that messages are encoded using a textual representation of XML, see TextMessageEncodingBindingElement.

如需有關指定訊息之繫結項目的詳細資訊, 請參閱BinaryMessageEncodingBindingElement使用 .net 二進位格式的 XML 來編碼。For more information about the binding element that specifies messages are encoded using the .NET Binary Format for XML, see BinaryMessageEncodingBindingElement.

如果要實作自訂訊息編碼器,請使用 MessageEncodingBindingElement 類別。To implement a custom message encoder, use the MessageEncodingBindingElement class.

建構函式

MtomMessageEncodingBindingElement()

初始化 MtomMessageEncodingBindingElement 類別的新執行個體。Initializes a new instance of the MtomMessageEncodingBindingElement class.

MtomMessageEncodingBindingElement(MessageVersion, Encoding)

使用指定的訊息版本和字元編碼,初始化 MtomMessageEncodingBindingElement 類別的新執行個體。Initializes a new instance of the MtomMessageEncodingBindingElement class with a specified message version and character encoding.

屬性

MaxBufferSize

取得或設定緩衝區大小上限。Gets or sets the maximum buffer size.

MaxReadPoolSize

取得或設定 XML 讀取器的數目上限,這些是配置於集區、準備用來處理傳入訊息的讀取器。Gets or sets the maximum number of XML readers that is allocated to a pool and is ready for use to process incoming messages.

MaxWritePoolSize

取得或設定 XML 寫入器的數目上限,這些是配置於集區、準備用來處理傳出訊息的寫入器。Gets or sets the maximum number of XML writers that is allocated to a pool and are ready for use to process outgoing messages.

MessageVersion

取得或設定已使用或需要使用的 SOAP 訊息和 WS-Addressing 版本。Gets or sets the SOAP message and WS-Addressing versions that are used or expected.

ReaderQuotas

取得或設定 XML 訊息複雜度的條件約束,而這些條件約束可由以此繫結項目所設定的端點處理。Gets or sets constraints on the complexity of XML messages that can be processed by endpoints configured with this binding element.

WriteEncoding

取得或設定用於格式化文字訊息字元的編碼。Gets or sets the encoding that is used to format the characters in the text message.

方法

BuildChannelFactory<TChannel>(BindingContext)

在用戶端上建置通道處理站堆疊,這個堆疊會針對指定的內容建立指定的通道類型。Builds the channel factory stack on the client that creates a specified type of channel for a specified context.

BuildChannelListener<TChannel>(BindingContext)

在用戶端上建置通道接聽程式堆疊,這個堆疊會針對指定的內容接受指定的通道類型。Builds the channel listener stack on the client that accepts a specified type of channel for a specified context.

CanBuildChannelFactory<TChannel>(BindingContext)

傳回值,這個值表示目前的繫結是否可以建置指定之通道及內容型別的處理站。Returns a value that indicates whether the current binding can build a factory for a specified type of channel and context.

CanBuildChannelListener<TChannel>(BindingContext)

傳回值,這個值會指出目前的繫結是否可以建置指定之通道及內容類型的接聽程式。Returns a value that indicates whether the current binding can build a listener for a specified type of channel and context.

Clone()

新建一個從目前 MtomMessageEncodingBindingElement 物件初始化的這類物件。Creates a new MtomMessageEncodingBindingElement object initialized from the current one.

CreateMessageEncoderFactory()

建立會編碼 MTOM 訊息的訊息編碼器處理站。Creates a message encoder factory that encodes MTOM messages.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetProperty<T>(BindingContext)

從繫結項目堆疊的適當層次中,傳回要求的型別物件 (如果有的話)。Returns a typed object requested, if present, from the appropriate layer in the binding element stack.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ShouldSerializeMessageVersion()

傳回 SOAP 訊息結構版本是否應該序列化。Returns whether the SOAP message structure version should be serialized.

ShouldSerializeReaderQuotas()

傳回是否應序列化針對 SOAP 訊息結構複雜度所設立的約束條件。Returns whether the constraints placed on the complexity of SOAP message structure should be serialized.

ShouldSerializeWriteEncoding()

傳回是否應序列化用於格式化訊息字元的 EncodingReturns whether the Encoding that is used to format the message characters should be serialized.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

明確介面實作

IPolicyExportExtension.ExportPolicy(MetadataExporter, PolicyConversionContext)

將產生的原則判斷提示插入 WSDL,該原則判斷提示會指出正在使用 MTOM 編碼。Inserts a policy assertion into the WSDL, when it is generated, which indicates that an MTOM encoding is being used.

IWsdlExportExtension.ExportContract(WsdlExporter, WsdlContractConversionContext)

修改 MTOM 特定的資訊 WSDL 合約。Modifies the WSDL contract for MTOM-specific information.

IWsdlExportExtension.ExportEndpoint(WsdlExporter, WsdlEndpointConversionContext)

將 SOAP 訊息版本置入 WSDL。Puts the SOAP message version into the WSDL.

適用於