Compartilhar via


MediaTypeFormatterCollection Class

Represents a collection class that contains MediaTypeFormatter instances.

Inheritance Hierarchy

System.Object
  System.Collections.ObjectModel.Collection<MediaTypeFormatter>
    System.Net.Http.Formatting.MediaTypeFormatterCollection

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

Syntax

'Declaration
Public Class MediaTypeFormatterCollection _
    Inherits Collection(Of MediaTypeFormatter)
'Usage
Dim instance As MediaTypeFormatterCollection
public class MediaTypeFormatterCollection : Collection<MediaTypeFormatter>
public ref class MediaTypeFormatterCollection : public Collection<MediaTypeFormatter^>
type MediaTypeFormatterCollection =  
    class
        inherit Collection<MediaTypeFormatter>
    end
public class MediaTypeFormatterCollection extends Collection<MediaTypeFormatter>

The MediaTypeFormatterCollection type exposes the following members.

Constructors

  Name Description
Public method MediaTypeFormatterCollection() Initializes a new instance of the MediaTypeFormatterCollection class with default values.
Public method MediaTypeFormatterCollection(IEnumerable<MediaTypeFormatter>) Initializes a new instance of the MediaTypeFormatterCollection class with the given formatters.

Top

Properties

  Name Description
Public property Count (Inherited from Collection<MediaTypeFormatter>.)
Public property FormUrlEncodedFormatter Gets the MediaTypeFormatter to use for application/x-www-form-urlencoded data.
Public property Item (Inherited from Collection<MediaTypeFormatter>.)
Protected property Items (Inherited from Collection<MediaTypeFormatter>.)
Public property JsonFormatter Gets the MediaTypeFormatter to use for JSON.
Public property XmlFormatter Gets the MediaTypeFormatter to use for XML.

Top

Methods

  Name Description
Public method Add (Inherited from Collection<MediaTypeFormatter>.)
Public method Clear (Inherited from Collection<MediaTypeFormatter>.)
Protected method ClearItems (Inherited from Collection<MediaTypeFormatter>.)
Public method Contains (Inherited from Collection<MediaTypeFormatter>.)
Public method CopyTo (Inherited from Collection<MediaTypeFormatter>.)
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method FindReader Searches a collection for a formatter that can read the .NET type in the given mediaType.
Public method FindWriter Searches a collection for a formatter that can write the .NET type in the given mediaType.
Public method GetEnumerator (Inherited from Collection<MediaTypeFormatter>.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method IndexOf (Inherited from Collection<MediaTypeFormatter>.)
Public method Insert (Inherited from Collection<MediaTypeFormatter>.)
Protected method InsertItem (Inherited from Collection<MediaTypeFormatter>.)
Public methodStatic member IsTypeExcludedFromValidation Determines whether the type is one of those loosely defined types that should be excluded from validation.
Protected method MemberwiseClone (Inherited from Object.)
Public method Remove (Inherited from Collection<MediaTypeFormatter>.)
Public method RemoveAt (Inherited from Collection<MediaTypeFormatter>.)
Protected method RemoveItem (Inherited from Collection<MediaTypeFormatter>.)
Protected method SetItem (Inherited from Collection<MediaTypeFormatter>.)
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IList.Add (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate method IList.Contains (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate method ICollection.CopyTo (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate method IList.IndexOf (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate method IList.Insert (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate property IList.IsFixedSize (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate property ICollection<T>.IsReadOnly (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate property IList.IsReadOnly (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate property ICollection.IsSynchronized (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate property IList.Item (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate method IList.Remove (Inherited from Collection<MediaTypeFormatter>.)
Explicit interface implemetationPrivate property ICollection.SyncRoot (Inherited from Collection<MediaTypeFormatter>.)

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