StatusCodeResult Constructor
Namespace: System.Web.Http.Results
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
StatusCodeResult(HttpStatusCode, ApiController) | Initializes a new instance of the StatusCodeResult class. |
|
StatusCodeResult(HttpStatusCode, HttpRequestMessage) | Initializes a new instance of the StatusCodeResult class. |
See Also
StatusCodeResult Class
System.Web.Http.Results Namespace
Return to top
StatusCodeResult Constructor (HttpStatusCode, ApiController)
Initializes a new instance of the StatusCodeResult class.
Syntax
public StatusCodeResult(
HttpStatusCode statusCode,
ApiController controller
)
public:
StatusCodeResult(
HttpStatusCode statusCode,
ApiController^ controller
)
new :
statusCode:HttpStatusCode *
controller:ApiController -> StatusCodeResult
Public Sub New (
statusCode As HttpStatusCode,
controller As ApiController
)
Parameters
statusCode
Type: System.Net.HttpStatusCodeThe HTTP status code for the response message.
controller
Type: System.Web.Http.ApiControllerThe controller from which to obtain the dependencies needed for execution.
Return to top
StatusCodeResult Constructor (HttpStatusCode, HttpRequestMessage)
Initializes a new instance of the StatusCodeResult class.
Syntax
public StatusCodeResult(
HttpStatusCode statusCode,
HttpRequestMessage request
)
public:
StatusCodeResult(
HttpStatusCode statusCode,
HttpRequestMessage^ request
)
new :
statusCode:HttpStatusCode *
request:HttpRequestMessage -> StatusCodeResult
Public Sub New (
statusCode As HttpStatusCode,
request As HttpRequestMessage
)
Parameters
statusCode
Type: System.Net.HttpStatusCodeThe HTTP status code for the response message.
request
Type: System.Net.Http.HttpRequestMessageThe request message which led to this result.
Return to top