Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace:   System.Web.Http.Results
Assembly:  System.Web.Http (in System.Web.Http.dll)
Overload List
| Name | Description | |
|---|---|---|
| .jpeg) | NegotiatedContentResult<T>(HttpStatusCode, T, ApiController) | Initializes a new instance of the NegotiatedContentResult<T> class with the values provided. | 
| .jpeg) | NegotiatedContentResult<T>(HttpStatusCode, T, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>) | Initializes a new instance of the NegotiatedContentResult<T> class with the values provided. | 
See Also
NegotiatedContentResult<T> Class
System.Web.Http.Results Namespace
Return to top
NegotiatedContentResult<T> Constructor (HttpStatusCode, T, ApiController)
Initializes a new instance of the NegotiatedContentResult<T> class with the values provided.
Syntax
public NegotiatedContentResult(
    HttpStatusCode statusCode,
    T content,
    ApiController controller
)
public:
NegotiatedContentResult(
    HttpStatusCode statusCode,
    T content,
    ApiController^ controller
)
new : 
        statusCode:HttpStatusCode *
        content:'T *
        controller:ApiController -> NegotiatedContentResult
Public Sub New (
    statusCode As HttpStatusCode,
    content As T,
    controller As ApiController
)
Parameters
- statusCode 
 Type: System.Net.HttpStatusCode- The HTTP status code for the response message. 
- content 
 Type: T- The content value to negotiate and format in the entity body. 
- controller 
 Type: System.Web.Http.ApiController- The controller from which to obtain the dependencies needed for execution. 
Return to top
NegotiatedContentResult<T> Constructor (HttpStatusCode, T, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>)
Initializes a new instance of the NegotiatedContentResult<T> class with the values provided.
Syntax
public NegotiatedContentResult(
    HttpStatusCode statusCode,
    T content,
    IContentNegotiator contentNegotiator,
    HttpRequestMessage request,
    IEnumerable<MediaTypeFormatter> formatters
)
public:
NegotiatedContentResult(
    HttpStatusCode statusCode,
    T content,
    IContentNegotiator^ contentNegotiator,
    HttpRequestMessage^ request,
    IEnumerable<MediaTypeFormatter^>^ formatters
)
new : 
        statusCode:HttpStatusCode *
        content:'T *
        contentNegotiator:IContentNegotiator *
        request:HttpRequestMessage *
        formatters:IEnumerable<MediaTypeFormatter> -> NegotiatedContentResult
Public Sub New (
    statusCode As HttpStatusCode,
    content As T,
    contentNegotiator As IContentNegotiator,
    request As HttpRequestMessage,
    formatters As IEnumerable(Of MediaTypeFormatter)
)
Parameters
- statusCode 
 Type: System.Net.HttpStatusCode- The HTTP status code for the response message. 
- content 
 Type: T- The content value to negotiate and format in the entity body. 
- contentNegotiator 
 Type: System.Net.Http.Formatting.IContentNegotiator- The content negotiator to handle content negotiation. 
- request 
 Type: System.Net.Http.HttpRequestMessage- The request message which led to this result. 
- formatters 
 Type: System.Collections.Generic.IEnumerable<MediaTypeFormatter>- The formatters to use to negotiate and format the content. 
Return to top