DefaultContentNegotiator.MatchAcceptHeader Method (IEnumerable<MediaTypeWithQualityHeaderValue>, MediaTypeFormatter)

 

Matches a set of Accept header fields against the media types that a formatter supports.

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

Syntax

protected virtual MediaTypeFormatterMatch MatchAcceptHeader(
    IEnumerable<MediaTypeWithQualityHeaderValue> sortedAcceptValues,
    MediaTypeFormatter formatter
)
protected:
virtual MediaTypeFormatterMatch^ MatchAcceptHeader(
    IEnumerable<MediaTypeWithQualityHeaderValue^>^ sortedAcceptValues,
    MediaTypeFormatter^ formatter
)
abstract MatchAcceptHeader : 
        sortedAcceptValues:IEnumerable<MediaTypeWithQualityHeaderValue> *
        formatter:MediaTypeFormatter -> MediaTypeFormatterMatch
override MatchAcceptHeader : 
        sortedAcceptValues:IEnumerable<MediaTypeWithQualityHeaderValue> *
        formatter:MediaTypeFormatter -> MediaTypeFormatterMatch
Protected Overridable Function MatchAcceptHeader (
    sortedAcceptValues As IEnumerable(Of MediaTypeWithQualityHeaderValue),
    formatter As MediaTypeFormatter
) As MediaTypeFormatterMatch

Parameters

Return Value

Type: System.Net.Http.Formatting.MediaTypeFormatterMatch

Returns a MediaTypeFormatterMatch object that indicates the quality of the match, or null if there is no match.

See Also

DefaultContentNegotiator Class
System.Net.Http.Formatting Namespace

Return to top