TextOutputFormatter Class

Definition

Writes an object in a given text format to the output stream.

public ref class TextOutputFormatter abstract : Microsoft::AspNetCore::Mvc::Formatters::OutputFormatter
public abstract class TextOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter
type TextOutputFormatter = class
    inherit OutputFormatter
Public MustInherit Class TextOutputFormatter
Inherits OutputFormatter
Inheritance
TextOutputFormatter
Derived

Constructors

TextOutputFormatter()

Initializes a new instance of the TextOutputFormatter class.

Properties

SupportedEncodings

Gets the mutable collection of character encodings supported by this TextOutputFormatter. The encodings are used when writing the data.

SupportedMediaTypes

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

(Inherited from OutputFormatter)

Methods

CanWriteResult(OutputFormatterCanWriteContext)

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

(Inherited from OutputFormatter)
CanWriteType(Type)

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

(Inherited from OutputFormatter)
GetSupportedContentTypes(String, Type)

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

(Inherited from OutputFormatter)
SelectCharacterEncoding(OutputFormatterWriteContext)

Determines the best Encoding amongst the supported encodings for reading or writing an HTTP entity body based on the provided content type.

WriteAsync(OutputFormatterWriteContext)

Writes the object represented by context's Object property.

WriteResponseBodyAsync(OutputFormatterWriteContext)

Writes the response body.

WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding)

Writes the response body.

WriteResponseHeaders(OutputFormatterWriteContext)

Sets the headers on HttpResponse object.

(Inherited from OutputFormatter)

Applies to