Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MediaTypeFormatter.GetPerRequestFormatterInstance Method (Type, HttpRequestMessage, MediaTypeHeaderValue)


Returns a specialized instance of the MediaTypeFormatter that can format a response for the given parameters.

Namespace:   System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

No code example is currently available or this language may not be supported.


Type: System.Type

The type to format.

Type: System.Net.Http.HttpRequestMessage

The request.

Type: System.Net.Http.Headers.MediaTypeHeaderValue

The media type.

The DefaultContentNegotiator calls this method after it selects a formatter. The default implementation returns this instance. A derived class can return a new instance if it needs to initialize the formatter or use a specialized version.

Return to top
© 2015 Microsoft