DefaultContentNegotiator.SortStringWithQualityHeaderValuesByQFactor Method (ICollection<StringWithQualityHeaderValue>)

 

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)

protected virtual IEnumerable<StringWithQualityHeaderValue> SortStringWithQualityHeaderValuesByQFactor(
	ICollection<StringWithQualityHeaderValue> headerValues
)

Parameters

headerValues
Type: System.Collections.Generic.ICollection<StringWithQualityHeaderValue>

A collection of StringWithQualityHeaderValue objects, representing the header fields.

Return Value

Type: System.Collections.Generic.IEnumerable<StringWithQualityHeaderValue>

Returns the sorted list of StringWithQualityHeaderValue objects.

Return to top
Show: