Share via


FormatManager Class

 

Represents the class that maintains a registration of handlers for request and response formats

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

Inheritance Hierarchy

System.Object
  Microsoft.Web.Mvc.Resources.FormatManager
    Microsoft.Web.Mvc.Resources.DefaultFormatManager

Syntax

public class FormatManager
public ref class FormatManager 
type FormatManager = class end
Public Class FormatManager

Constructors

Name Description
System_CAPS_pubmethod FormatManager()

Initializes a new instance of the FormatManager class.

Properties

Name Description
System_CAPS_pubpropertySystem_CAPS_static Current

Gets or sets the current value for the format manager.

System_CAPS_pubproperty FormatHelper

Gets or sets the base class for content negotiation support.

System_CAPS_pubproperty RequestFormatHandlers

Gets the list of handlers that can parse the request body.

System_CAPS_pubproperty ResponseFormatHandlers

Gets the list of handlers that can serialize the response body.

Methods

Name Description
System_CAPS_pubmethod CanDeserialize(ContentType)

Returns true if the specified content type can be deserialized.

System_CAPS_pubmethod CanSerialize(ContentType)

Returns true if the specified response format can be serialized.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod Serialize(ControllerContext, Object, ContentType)

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

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod TryDeserialize(ControllerContext, ModelBindingContext, ContentType, Object)

Returns true if the specified controller context, binding context, request format and model object can be deserialized.

System_CAPS_pubmethod TryMapFormatFriendlyName(String, ContentType)

Returns true if the specified format 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.

Fields

Name Description
System_CAPS_pubfieldSystem_CAPS_static UrlEncoded

Represents the URL encoded.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Web.Mvc.Resources Namespace

Return to top