Export (0) Print
Expand All

WebContentTypeMapper.GetMessageFormatForContentType Method

When overridden in a derived class, returns the message format used for a specified content type.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel.Web (in System.ServiceModel.Web.dll)

public abstract WebContentFormat GetMessageFormatForContentType(
	string contentType
)

Parameters

contentType
Type: System.String

The content type that indicates the MIME type of data to be interpreted.

Return Value

Type: System.ServiceModel.Channels.WebContentFormat
The WebContentFormat that specifies the format to which the message content type is mapped.

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.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5

Community Additions

ADD
Show:
© 2014 Microsoft