Export (0) Print
Expand All

DefaultContentNegotiator Class

The default implementation of IContentNegotiator, which is used to select a MediaTypeFormatter for an HttpRequestMessage or HttpResponseMessage.

System.Object
  System.Net.Http.Formatting.DefaultContentNegotiator

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

public class DefaultContentNegotiator : IContentNegotiator

The DefaultContentNegotiator type exposes the following members.

  NameDescription
Public methodDefaultContentNegotiator()Initializes a new instance of the DefaultContentNegotiator class.
Public methodDefaultContentNegotiator(Boolean)Initializes a new instance of the DefaultContentNegotiator class.
Top

  NameDescription
Public propertyExcludeMatchOnTypeOnlyIf true, exclude formatters that match only on the object type; otherwise, false.
Top

  NameDescription
Protected methodComputeFormatterMatchesDetermines how well each formatter matches an HTTP request.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMatchAcceptHeaderMatches a set of Accept header fields against the media types that a formatter supports.
Protected methodMatchMediaTypeMappingMatches a request against the MediaTypeMapping objects in a media-type formatter.
Protected methodMatchRequestMediaTypeMatch the content type of a request against the media types that a formatter supports.
Protected methodMatchTypeSelects the first supported media type of a formatter.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodNegotiate 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.
Protected methodSelectResponseCharacterEncodingDetermines the best character encoding for writing the response.
Protected methodSelectResponseMediaTypeFormatterSelects the best match among the candidate matches found.
Protected methodSortMediaTypeWithQualityHeaderValuesByQFactorSorts Accept header values in descending order of q factor.
Protected methodSortStringWithQualityHeaderValuesByQFactorSorts a list of Accept-Charset, Accept-Encoding, Accept-Language or related header values in descending order or q factor.
Public methodToString (Inherited from Object.)
Protected methodUpdateBestMatchEvaluates whether a match is better than the current match.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft