DefaultContentNegotiator Class
The default implementation of IContentNegotiator, which is used to select a MediaTypeFormatter for an HttpRequestMessage or HttpResponseMessage.
Inheritance Hierarchy
System.Object
System.Net.Http.Formatting.DefaultContentNegotiator
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
Public Class DefaultContentNegotiator _
Implements IContentNegotiator
'Usage
Dim instance As DefaultContentNegotiator
public class DefaultContentNegotiator : IContentNegotiator
public ref class DefaultContentNegotiator : IContentNegotiator
type DefaultContentNegotiator =
class
interface IContentNegotiator
end
public class DefaultContentNegotiator implements IContentNegotiator
The DefaultContentNegotiator type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DefaultContentNegotiator() | Initializes a new instance of the DefaultContentNegotiator class. | |
DefaultContentNegotiator(Boolean) | Initializes a new instance of the DefaultContentNegotiator class. |
Top
Properties
Name | Description | |
---|---|---|
ExcludeMatchOnTypeOnly | If true, exclude formatters that match only on the object type; otherwise, false. |
Top
Methods
Name | Description | |
---|---|---|
ComputeFormatterMatches | Determines how well each formatter matches an HTTP request. | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MatchAcceptHeader | Matches a set of Accept header fields against the media types that a formatter supports. | |
MatchMediaTypeMapping | Matches a request against the MediaTypeMapping objects in a media-type formatter. | |
MatchRequestMediaType | Match the content type of a request against the media types that a formatter supports. | |
MatchType | Selects the first supported media type of a formatter. | |
MemberwiseClone | (Inherited from Object.) | |
Negotiate | Performs content negotiating by selecting the most appropriate MediaTypeFormatter out of the passed in formatters for the given request that can serialize an object of the given type. | |
SelectResponseCharacterEncoding | Determines the best character encoding for writing the response. | |
SelectResponseMediaTypeFormatter | Selects the best match among the candidate matches found. | |
SortMediaTypeWithQualityHeaderValuesByQFactor | Sorts Accept header values in descending order of q factor. | |
SortStringWithQualityHeaderValuesByQFactor | Sorts a list of Accept-Charset, Accept-Encoding, Accept-Language or related header values in descending order or q factor. | |
ToString | (Inherited from Object.) | |
UpdateBestMatch | Evaluates whether a match is better than the current match. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.