Compartilhar via


DefaultContentNegotiator.SortStringWithQualityHeaderValuesByQFactor Method

Sorts a list of Accept-Charset, Accept-Encoding, Accept-Language or related header values in descending order or q factor.

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

Syntax

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

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

Parameters

Return Value

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

See Also

Reference

DefaultContentNegotiator Class

System.Net.Http.Formatting Namespace