StringOutputFormatter Class

Summary

Always writes a string value to the response, regardless of requested content type.

Syntax

public class StringOutputFormatter : OutputFormatter, IOutputFormatter, IApiResponseFormatMetadataProvider

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.StringOutputFormatter

Constructors

Microsoft.AspNet.Mvc.StringOutputFormatter.StringOutputFormatter()
public StringOutputFormatter()

Methods

CanWriteResult(Microsoft.AspNet.Mvc.OutputFormatterContext, MediaTypeHeaderValue)
Arguments:
Return type:

System.Boolean

public override bool CanWriteResult(OutputFormatterContext context, MediaTypeHeaderValue contentType)
WriteResponseBodyAsync(Microsoft.AspNet.Mvc.OutputFormatterContext)
Arguments:
Return type:

System.Threading.Tasks.Task

public override Task WriteResponseBodyAsync(OutputFormatterContext context)