MediaTypeFormatterCollection Class

 

Collection class that contains MediaTypeFormatter instances.

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

Inheritance Hierarchy

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

Syntax

public class MediaTypeFormatterCollection : Collection<MediaTypeFormatter>
public ref class MediaTypeFormatterCollection : Collection<MediaTypeFormatter^>
type MediaTypeFormatterCollection = 
    class
        inherit Collection<MediaTypeFormatter>
    end
Public Class MediaTypeFormatterCollection
    Inherits Collection(Of MediaTypeFormatter)

Constructors

Name Description
System_CAPS_pubmethod MediaTypeFormatterCollection()

Initializes a new instance of the MediaTypeFormatterCollection class.

System_CAPS_pubmethod MediaTypeFormatterCollection(IEnumerable<MediaTypeFormatter>)

Initializes a new instance of the MediaTypeFormatterCollection class.

Properties

Name Description
System_CAPS_pubproperty Count

(Inherited from Collection<T>.)

System_CAPS_pubproperty FormUrlEncodedFormatter

Gets the MediaTypeFormatter to use for application/x-www-form-urlencoded data.

System_CAPS_pubproperty Item[Int32]

(Inherited from Collection<T>.)

System_CAPS_protproperty Items

(Inherited from Collection<T>.)

System_CAPS_pubproperty JsonFormatter

Gets the MediaTypeFormatter to use for JSON.

System_CAPS_pubproperty XmlFormatter

Gets the MediaTypeFormatter to use for XML.

Methods

Name Description
System_CAPS_pubmethod Add(T)

(Inherited from Collection<T>.)

System_CAPS_pubmethod AddRange(IEnumerable<MediaTypeFormatter>)

Adds the elements of the specified collection to the end of the MediaTypeFormatterCollection.

System_CAPS_pubmethod Clear()

(Inherited from Collection<T>.)

System_CAPS_protmethod ClearItems()

Removes all items in the collection.(Overrides Collection<T>.ClearItems().)

System_CAPS_pubmethod Contains(T)

(Inherited from Collection<T>.)

System_CAPS_pubmethod CopyTo(T[], Int32)

(Inherited from Collection<T>.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod FindReader(Type, MediaTypeHeaderValue)

Helper to search a collection for a formatter that can read the .NET type in the given mediaType.

System_CAPS_pubmethod FindWriter(Type, MediaTypeHeaderValue)

Helper to search a collection for a formatter that can write the .NET type in the given mediaType.

System_CAPS_pubmethod GetEnumerator()

(Inherited from Collection<T>.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod IndexOf(T)

(Inherited from Collection<T>.)

System_CAPS_pubmethod Insert(Int32, T)

(Inherited from Collection<T>.)

System_CAPS_protmethod InsertItem(Int32, MediaTypeFormatter)

Inserts the specified item at the specified index in the collection.(Overrides Collection<T>.InsertItem(Int32, T).)

System_CAPS_pubmethod InsertRange(Int32, IEnumerable<MediaTypeFormatter>)

Inserts the elements of a collection into the MediaTypeFormatterCollection at the specified index.

System_CAPS_pubmethodSystem_CAPS_static IsTypeExcludedFromValidation(Type)

Returns true if the type is one of those loosely defined types that should be excluded from validation.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod Remove(T)

(Inherited from Collection<T>.)

System_CAPS_pubmethod RemoveAt(Int32)

(Inherited from Collection<T>.)

System_CAPS_protmethod RemoveItem(Int32)

Removes the item at the specified index.(Overrides Collection<T>.RemoveItem(Int32).)

System_CAPS_protmethod SetItem(Int32, MediaTypeFormatter)

Assigns the item at the specified index in the collection.(Overrides Collection<T>.SetItem(Int32, T).)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection.CopyTo(Array, Int32)

(Inherited from Collection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IEnumerable.GetEnumerator()

(Inherited from Collection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Add(Object)

(Inherited from Collection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Contains(Object)

(Inherited from Collection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.IndexOf(Object)

(Inherited from Collection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Insert(Int32, Object)

(Inherited from Collection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IList.Remove(Object)

(Inherited from Collection<T>.)

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

System.Net.Http.Formatting Namespace

Return to top