共用方式為


MessageEncodingBindingElement.CreateMessageEncoderFactory 方法

定義

在衍生類別中覆寫時,會建立產生訊息編碼器的處理站。

public:
 abstract System::ServiceModel::Channels::MessageEncoderFactory ^ CreateMessageEncoderFactory();
public abstract System.ServiceModel.Channels.MessageEncoderFactory CreateMessageEncoderFactory ();
abstract member CreateMessageEncoderFactory : unit -> System.ServiceModel.Channels.MessageEncoderFactory
Public MustOverride Function CreateMessageEncoderFactory () As MessageEncoderFactory

傳回

用於產生訊息編碼器的 MessageEncoderFactory

範例

下列程式碼將說明如何實作 CreateMessageEncoderFactory

public override MessageEncoderFactory CreateMessageEncoderFactory()
{
    return new CustomTextMessageEncoderFactory(this.MediaType,
        this.Encoding, this.MessageVersion);
}

適用於