MessageEncodingBindingElement.CreateMessageEncoderFactory MessageEncodingBindingElement.CreateMessageEncoderFactory MessageEncodingBindingElement.CreateMessageEncoderFactory MessageEncodingBindingElement.CreateMessageEncoderFactory Method

定義

在衍生類別中覆寫時,會建立產生訊息編碼器的處理站。When overridden in a derived class, creates a factory for producing message encoders.

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

傳回

範例

下列程式碼將說明如何實作 CreateMessageEncoderFactoryThe following code illustrates how to implement the CreateMessageEncoderFactory:

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

適用於