FormatterCollection<TFormatter> Class

Represents a collection of formatters.

Namespace
Microsoft.AspNetCore.Mvc.Formatters
Assemblies
  • Microsoft.AspNetCore.Mvc.Abstractions

Inheritance Hierarchy

Syntax

public class FormatterCollection<TFormatter> : Collection<TFormatter>, IList<TFormatter>, ICollection<TFormatter>, IList, ICollection, IReadOnlyList<TFormatter>, IReadOnlyCollection<TFormatter>, IEnumerable<TFormatter>, IEnumerable
class Microsoft.AspNetCore.Mvc.Formatters.FormatterCollection<TFormatter>

Constructors

FormatterCollection()

Initializes a new instance of the Microsoft.AspNetCore.Mvc.Formatters.FormatterCollection`1 class that is empty.

public FormatterCollection()
FormatterCollection(System.Collections.Generic.IList<TFormatter>)

Initializes a new instance of the Microsoft.AspNetCore.Mvc.Formatters.FormatterCollection`1 class as a wrapper for the specified list.

Arguments:list (System.Collections.Generic.IList<TFormatter>) – The list that is wrapped by the new collection.
public FormatterCollection(IList<TFormatter> list)

Methods

RemoveType<T>()

Removes all formatters of the specified type.

public void RemoveType<T>()where T : TFormatter