OutputFormatterContext Class

Summary

Represents information used by a formatter for participating in output content negotiation and in writing out the response.

Syntax

public class OutputFormatterContext

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.OutputFormatterContext

Properties

DeclaredType()

The declared return type of the action.

Return type:System.Type
public Type DeclaredType { get; set; }
FailedContentNegotiation()

Gets or sets a flag to indicate that content-negotiation could not find a formatter based on the information on the @!:Http.HttpRequest-.

Return type:System.Nullable{System.Boolean}
public bool ? FailedContentNegotiation { get; set; }
HttpContext()

Gets or sets the [Microsoft.AspNet.Mvc.OutputFormatterContext.HttpContext](Microsoft.AspNet.Mvc.OutputFormatterContext.yml) context associated with the current operation.

Return type:HttpContext
public HttpContext HttpContext { get; set; }
Object()

The return value of the action method.

Return type:System.Object
public object Object { get; set; }
SelectedContentType()

The content type which is chosen by the selected formatter.

Return type:MediaTypeHeaderValue
public MediaTypeHeaderValue SelectedContentType { get; set; }
SelectedEncoding()

The encoding which is chosen by the selected formatter.

Return type:System.Text.Encoding
public Encoding SelectedEncoding { get; set; }
StatusCode()

Gets the status code that should be used for the response when successfully formatting.

Return type:System.Nullable{System.Int32}
public int ? StatusCode { get; set; }