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 | |
---|---|---|
MediaTypeFormatterCollection() | Initializes a new instance of the MediaTypeFormatterCollection class. |
|
MediaTypeFormatterCollection(IEnumerable<MediaTypeFormatter>) | Initializes a new instance of the MediaTypeFormatterCollection class. |
Properties
Name | Description | |
---|---|---|
Count | (Inherited from Collection<T>.) |
|
FormUrlEncodedFormatter | Gets the MediaTypeFormatter to use for application/x-www-form-urlencoded data. |
|
Item[Int32] | (Inherited from Collection<T>.) |
|
Items | (Inherited from Collection<T>.) |
|
JsonFormatter | Gets the MediaTypeFormatter to use for JSON. |
|
XmlFormatter | Gets the MediaTypeFormatter to use for XML. |
Methods
Name | Description | |
---|---|---|
Add(T) | (Inherited from Collection<T>.) |
|
AddRange(IEnumerable<MediaTypeFormatter>) | Adds the elements of the specified collection to the end of the MediaTypeFormatterCollection. |
|
Clear() | (Inherited from Collection<T>.) |
|
ClearItems() | Removes all items in the collection.(Overrides Collection<T>.ClearItems().) |
|
Contains(T) | (Inherited from Collection<T>.) |
|
CopyTo(T[], Int32) | (Inherited from Collection<T>.) |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
FindReader(Type, MediaTypeHeaderValue) | Helper to search a collection for a formatter that can read the .NET type in the given mediaType. |
|
FindWriter(Type, MediaTypeHeaderValue) | Helper to search a collection for a formatter that can write the .NET type in the given mediaType. |
|
GetEnumerator() | (Inherited from Collection<T>.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
IndexOf(T) | (Inherited from Collection<T>.) |
|
Insert(Int32, T) | (Inherited from Collection<T>.) |
|
InsertItem(Int32, MediaTypeFormatter) | Inserts the specified item at the specified index in the collection.(Overrides Collection<T>.InsertItem(Int32, T).) |
|
InsertRange(Int32, IEnumerable<MediaTypeFormatter>) | Inserts the elements of a collection into the MediaTypeFormatterCollection at the specified index. |
|
IsTypeExcludedFromValidation(Type) | Returns true if the type is one of those loosely defined types that should be excluded from validation. |
|
MemberwiseClone() | (Inherited from Object.) |
|
Remove(T) | (Inherited from Collection<T>.) |
|
RemoveAt(Int32) | (Inherited from Collection<T>.) |
|
RemoveItem(Int32) | Removes the item at the specified index.(Overrides Collection<T>.RemoveItem(Int32).) |
|
SetItem(Int32, MediaTypeFormatter) | Assigns the item at the specified index in the collection.(Overrides Collection<T>.SetItem(Int32, T).) |
|
ToString() | (Inherited from Object.) |
Explicit Interface Implementations
Name | Description | |
---|---|---|
ICollection.CopyTo(Array, Int32) | (Inherited from Collection<T>.) |
|
IEnumerable.GetEnumerator() | (Inherited from Collection<T>.) |
|
IList.Add(Object) | (Inherited from Collection<T>.) |
|
IList.Contains(Object) | (Inherited from Collection<T>.) |
|
IList.IndexOf(Object) | (Inherited from Collection<T>.) |
|
IList.Insert(Int32, Object) | (Inherited from Collection<T>.) |
|
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