Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Microsoft.​Net.​Http.​Headers.​MediaTypeHeaderValueComparer
Assembly: Microsoft.Net.Http.Headers
Inheritance: object → MediaTypeHeaderValueComparer
Implemented Interfaces
Implementation of <see cref="T:System.Collections.Generic.IComparer`1" /> that can compare accept media type header fields based on their quality values (a.k.a q-values).
Properties
public static
MediaTypeHeaderValueComparer
QualityComparer
Gets the <see cref="T:Microsoft.Net.Http.Headers.MediaTypeHeaderValueComparer" /> instance.
Methods
public
int
Compare​(MediaTypeHeaderValue mediaType1,
MediaTypeHeaderValue mediaType2)
Remarks
Performs comparisons based on the arguments' quality values
(aka their "q-value"). Values with identical q-values are considered equal (i.e. the result is 0)
with the exception that suffixed subtype wildcards are considered less than subtype wildcards, subtype wildcards
are considered less than specific media types and full wildcards are considered less than
subtype wildcards. This allows callers to sort a sequence of <see cref="T:Microsoft.Net.Http.Headers.MediaTypeHeaderValue" /> following
their q-values in the order of specific media types, subtype wildcards, and last any full wildcards.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object