NegotiatedContentResult<T> Class

Summary

An action result that performs content negotiation.

Syntax

public class NegotiatedContentResult<T> : ObjectResult, IActionResult

GitHub

View on GitHub

class System.Web.Http.NegotiatedContentResult<T>

Constructors

NegotiatedContentResult(System.Net.HttpStatusCode, T)

Initializes a new instance of the [System.Web.Http.NegotiatedContentResult`1](System.Web.Http.NegotiatedContentResult`1.yml) class with the values provided.

Arguments:
  • statusCode (System.Net.HttpStatusCode) – The HTTP status code for the response message.
  • content (T) – The content value to negotiate and format in the entity body.
public NegotiatedContentResult(HttpStatusCode statusCode, T content)

Properties

Content()

Gets the content value to negotiate and format in the entity body.

Return type:T
public T Content { get; }

Methods

ExecuteResultAsync(Microsoft.AspNet.Mvc.ActionContext)
Arguments:
Return type:

System.Threading.Tasks.Task

public override Task ExecuteResultAsync(ActionContext context)