OutputFormatterSelector Class

Definition

Selects an IOutputFormatter to write a response to the current request.

public ref class OutputFormatterSelector abstract
public abstract class OutputFormatterSelector
type OutputFormatterSelector = class
Public MustInherit Class OutputFormatterSelector
Inheritance
OutputFormatterSelector
Derived

Remarks

The default implementation of OutputFormatterSelector provided by ASP.NET Core MVC is DefaultOutputFormatterSelector. The DefaultOutputFormatterSelector implements MVC's default content negotiation algorithm. This API is designed in a way that can satisfy the contract of ObjectResult.

The default implementation is controlled by settings on MvcOptions, most notably: OutputFormatters, RespectBrowserAcceptHeader, and ReturnHttpNotAcceptable.

Constructors

OutputFormatterSelector()

Methods

SelectFormatter(OutputFormatterCanWriteContext, IList<IOutputFormatter>, MediaTypeCollection)

Selects an IOutputFormatter to write the response based on the provided values and the current request.

Applies to