WebContentTypeMapper.GetMessageFormatForContentType(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, returns the message format used for a specified content type.
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
Parameters
- contentType
- String
The content type that indicates the MIME type of data to be interpreted.
Returns
The WebContentFormat that specifies the format to which the message content type is mapped.
Remarks
This is intended to be an extensibility mechanism that can be used to override how content types are mapped to Web content formats. For example, if all incoming messages are processed as "raw binary data" without ever doing XML or JSON parsing, you could implement a WebContentTypeMapper that always returned Raw regardless of the content type that was passed in.