Share via


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)

Syntax

public interface IResponseFormatHandler
public interface class IResponseFormatHandler
type IResponseFormatHandler = interface end
Public Interface IResponseFormatHandler

Properties

Name Description
System_CAPS_pubproperty FriendlyName

Gets the preferred friendly name for the handled format.

Methods

Name Description
System_CAPS_pubmethod CanSerialize(ContentType)

Returns true if the specified response format can be serialized.

System_CAPS_pubmethod Serialize(ControllerContext, Object, ContentType)

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

System_CAPS_pubmethod TryMapFormatFriendlyName(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.

See Also

Microsoft.Web.Mvc.Resources Namespace

Return to top