BadRequestErrorMessageResult Constructor
Namespace: System.Web.Http.Results
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
BadRequestErrorMessageResult(String, ApiController) | Initializes a new instance of the BadRequestErrorMessageResult class. |
|
BadRequestErrorMessageResult(String, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>) | Initializes a new instance of the BadRequestErrorMessageResult class. |
See Also
BadRequestErrorMessageResult Class
System.Web.Http.Results Namespace
Return to top
BadRequestErrorMessageResult Constructor (String, ApiController)
Initializes a new instance of the BadRequestErrorMessageResult class.
Syntax
public BadRequestErrorMessageResult(
string message,
ApiController controller
)
public:
BadRequestErrorMessageResult(
String^ message,
ApiController^ controller
)
new :
message:string *
controller:ApiController -> BadRequestErrorMessageResult
Public Sub New (
message As String,
controller As ApiController
)
Parameters
message
Type: System.StringThe user-visible error message.
controller
Type: System.Web.Http.ApiControllerThe controller from which to obtain the dependencies needed for execution.
Return to top
BadRequestErrorMessageResult Constructor (String, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>)
Initializes a new instance of the BadRequestErrorMessageResult class.
Syntax
public BadRequestErrorMessageResult(
string message,
IContentNegotiator contentNegotiator,
HttpRequestMessage request,
IEnumerable<MediaTypeFormatter> formatters
)
public:
BadRequestErrorMessageResult(
String^ message,
IContentNegotiator^ contentNegotiator,
HttpRequestMessage^ request,
IEnumerable<MediaTypeFormatter^>^ formatters
)
new :
message:string *
contentNegotiator:IContentNegotiator *
request:HttpRequestMessage *
formatters:IEnumerable<MediaTypeFormatter> -> BadRequestErrorMessageResult
Public Sub New (
message As String,
contentNegotiator As IContentNegotiator,
request As HttpRequestMessage,
formatters As IEnumerable(Of MediaTypeFormatter)
)
Parameters
message
Type: System.StringThe user-visible error message.
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