DefaultContentNegotiator.SortMediaTypeWithQualityHeaderValuesByQFactor Method (ICollection<MediaTypeWithQualityHeaderValue>)

 

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)

protected virtual IEnumerable<MediaTypeWithQualityHeaderValue> SortMediaTypeWithQualityHeaderValuesByQFactor(
	ICollection<MediaTypeWithQualityHeaderValue> headerValues
)

Parameters

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

A collection of StringWithQualityHeaderValue objects, representing the header fields.

Return Value

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

Returns the sorted list of MediaTypeWithQualityHeaderValue objects.

Return to top
Show: