NegotiatedContentResult<T> Constructor
Namespace: System.Web.Http.Results
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
NegotiatedContentResult<T>(HttpStatusCode, T, ApiController) | Initializes a new instance of the NegotiatedContentResult<T> class with the values provided. |
|
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.HttpStatusCodeThe HTTP status code for the response message.
content
Type: TThe content value to negotiate and format in the entity body.
controller
Type: System.Web.Http.ApiControllerThe 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.HttpStatusCodeThe HTTP status code for the response message.
content
Type: TThe content value to negotiate and format in the entity body.
contentNegotiator
Type: System.Net.Http.Formatting.IContentNegotiatorThe content negotiator to handle content negotiation.
request
Type: System.Net.Http.HttpRequestMessageThe 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