IResponseFormatHandler Interface

 

Represents the extensibility mechanism for serializing response in additional formats. FormatManager.Current.RequestFormatHandlers contains the list of request formats supported by the web application.

Namespace:   Microsoft.Web.Mvc.Resources
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

type IResponseFormatHandler = interface end

NameDescription
System_CAPS_pubpropertyFriendlyName

Gets the preferred friendly name for the handled format.

NameDescription
System_CAPS_pubmethodCanSerialize(ContentType)

Returns true if the specified response format can be serialized.

System_CAPS_pubmethodSerialize(ControllerContext, Object, ContentType)

Serialize the model into the response body in the specified response format.

System_CAPS_pubmethodTryMapFormatFriendlyName(String, ContentType)

Returns true if the specified friendly name ('xml' for instance) can be mapped to a content type ('application/xml' for instance). If the mapping can be performed return the content type that the friendlyName maps to.

Return to top
Show: