次の方法で共有


MediaTypeFormatterExtensions Class

Represents extensions for adding MediaTypeMapping items to a MediaTypeFormatter.

Inheritance Hierarchy

System.Object
  System.Net.Http.Formatting.MediaTypeFormatterExtensions

Namespace:  System.Net.Http.Formatting
Assemblies:   System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public NotInheritable Class MediaTypeFormatterExtensions
'Usage
public static class MediaTypeFormatterExtensions
[ExtensionAttribute]
public ref class MediaTypeFormatterExtensions abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type MediaTypeFormatterExtensions =  class end
public final class MediaTypeFormatterExtensions

Methods

  Name Description
Public methodStatic member AddQueryStringMapping(MediaTypeFormatter, String, String, MediaTypeHeaderValue) Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with Uris containing a specific query parameter and value.
Public methodStatic member AddQueryStringMapping(MediaTypeFormatter, String, String, String) Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with Uris containing a specific query parameter and value.
Public methodStatic member AddRequestHeaderMapping(MediaTypeFormatter, String, String, StringComparison, Boolean, MediaTypeHeaderValue) Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with a specific HTTP request header field with a specific value.
Public methodStatic member AddRequestHeaderMapping(MediaTypeFormatter, String, String, StringComparison, Boolean, String) Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with a specific HTTP request header field with a specific value.
Public methodStatic member AddUriPathExtensionMapping(MediaTypeFormatter, String, MediaTypeHeaderValue) Updates the given formatter's set of MediaTypeMapping elements so that it associates the mediaType with Uris ending with the given uriPathExtension.
Public methodStatic member AddUriPathExtensionMapping(MediaTypeFormatter, String, String) Updates the given formatter's set of MediaTypeMapping elements so that it associates the mediaType with Uris ending with the given uriPathExtension.

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.

See Also

Reference

System.Net.Http.Formatting Namespace