WebContentTypeMapper.GetMessageFormatForContentType(String) 方法

定義

在衍生類別中覆寫時,傳回指定內容型別所使用的訊息格式。

public:
 abstract System::ServiceModel::Channels::WebContentFormat GetMessageFormatForContentType(System::String ^ contentType);
public abstract System.ServiceModel.Channels.WebContentFormat GetMessageFormatForContentType (string contentType);
abstract member GetMessageFormatForContentType : string -> System.ServiceModel.Channels.WebContentFormat
Public MustOverride Function GetMessageFormatForContentType (contentType As String) As WebContentFormat

參數

contentType
String

內容型別,表示要解譯之資料的 MIME 類型。

傳回

WebContentFormat,指定訊息內容型別要對應的格式。

備註

這是預計的擴充性機制,可用來覆寫內容型別對應至 Web 內容格式的方式。 例如,如果所有傳入訊息都會以「原始二進位資料」處理,而不需要執行 XML 或 JSON 剖析,您可以實 WebContentTypeMapper 作一律傳回 Raw 的 ,而不論傳入的內容類型為何。

適用於