Freigeben über


DefaultContentNegotiator.SortMediaTypeWithQualityHeaderValuesByQFactor Method

Sorts Accept header values in descending order of q factor.

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

Syntax

'Declaration
Protected Overridable Function SortMediaTypeWithQualityHeaderValuesByQFactor ( _
    headerValues As ICollection(Of MediaTypeWithQualityHeaderValue) _
) As IEnumerable(Of MediaTypeWithQualityHeaderValue)
'Usage
Dim headerValues As ICollection(Of MediaTypeWithQualityHeaderValue)
Dim returnValue As IEnumerable(Of MediaTypeWithQualityHeaderValue)

returnValue = Me.SortMediaTypeWithQualityHeaderValuesByQFactor(headerValues)
protected virtual IEnumerable<MediaTypeWithQualityHeaderValue> SortMediaTypeWithQualityHeaderValuesByQFactor(
    ICollection<MediaTypeWithQualityHeaderValue> headerValues
)
protected:
virtual IEnumerable<MediaTypeWithQualityHeaderValue^>^ SortMediaTypeWithQualityHeaderValuesByQFactor(
    ICollection<MediaTypeWithQualityHeaderValue^>^ headerValues
)
abstract SortMediaTypeWithQualityHeaderValuesByQFactor : 
        headerValues:ICollection<MediaTypeWithQualityHeaderValue> -> IEnumerable<MediaTypeWithQualityHeaderValue> 
override SortMediaTypeWithQualityHeaderValuesByQFactor : 
        headerValues:ICollection<MediaTypeWithQualityHeaderValue> -> IEnumerable<MediaTypeWithQualityHeaderValue> 
protected function SortMediaTypeWithQualityHeaderValuesByQFactor(
    headerValues : ICollection<MediaTypeWithQualityHeaderValue>
) : IEnumerable<MediaTypeWithQualityHeaderValue>

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<MediaTypeWithQualityHeaderValue>
Returns the sorted list of MediaTypeWithQualityHeaderValue objects.

See Also

Reference

DefaultContentNegotiator Class

System.Net.Http.Formatting Namespace