Share via


OutputFormatter Class

Definition

Writes an object to the output stream.

public ref class OutputFormatter abstract : Microsoft::AspNetCore::Mvc::ApiExplorer::IApiResponseTypeMetadataProvider, Microsoft::AspNetCore::Mvc::Formatters::IOutputFormatter
public abstract class OutputFormatter : Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseTypeMetadataProvider, Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter
type OutputFormatter = class
    interface IOutputFormatter
    interface IApiResponseTypeMetadataProvider
type OutputFormatter = class
    interface IApiResponseTypeMetadataProvider
    interface IOutputFormatter
Public MustInherit Class OutputFormatter
Implements IApiResponseTypeMetadataProvider, IOutputFormatter
Inheritance
OutputFormatter
Derived
Implements

Constructors

OutputFormatter()

Properties

SupportedMediaTypes

Gets the mutable collection of media type elements supported by this OutputFormatter.

Methods

CanWriteResult(OutputFormatterCanWriteContext)

Determines whether this IOutputFormatter can serialize an object of the specified type.

CanWriteType(Type)

Returns a value indicating whether or not the given type can be written by this serializer.

GetSupportedContentTypes(String, Type)

Gets a filtered list of content types which are supported by the IOutputFormatter for the objectType and contentType.

WriteAsync(OutputFormatterWriteContext)

Writes the object represented by context's Object property.

WriteResponseBodyAsync(OutputFormatterWriteContext)

Writes the response body.

WriteResponseHeaders(OutputFormatterWriteContext)

Sets the headers on HttpResponse object.

Applies to