Share via


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)

Syntax

public virtual MediaTypeFormatter GetPerRequestFormatterInstance(
    Type type,
    HttpRequestMessage request,
    MediaTypeHeaderValue mediaType
)
public:
virtual MediaTypeFormatter^ GetPerRequestFormatterInstance(
    Type^ type,
    HttpRequestMessage^ request,
    MediaTypeHeaderValue^ mediaType
)
abstract GetPerRequestFormatterInstance : 
        type:Type *
        request:HttpRequestMessage *
        mediaType:MediaTypeHeaderValue -> MediaTypeFormatter
override GetPerRequestFormatterInstance : 
        type:Type *
        request:HttpRequestMessage *
        mediaType:MediaTypeHeaderValue -> MediaTypeFormatter
Public Overridable Function GetPerRequestFormatterInstance (
    type As Type,
    request As HttpRequestMessage,
    mediaType As MediaTypeHeaderValue
) As MediaTypeFormatter

Parameters

Return Value

Type: System.Net.Http.Formatting.MediaTypeFormatter

Returns MediaTypeFormatter.

See Also

MediaTypeFormatter Class
System.Net.Http.Formatting Namespace

Return to top