Partager via


InvalidModelStateResult Constructor

 

Namespace:   System.Web.Http.Results
Assembly:  System.Web.Http (in System.Web.Http.dll)

Overload List

Name Description
System_CAPS_pubmethod InvalidModelStateResult(ModelStateDictionary, ApiController)

Initializes a new instance of the InvalidModelStateResult class.

System_CAPS_pubmethod InvalidModelStateResult(ModelStateDictionary, Boolean, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>)

Initializes a new instance of the InvalidModelStateResult class.

See Also

InvalidModelStateResult Class
System.Web.Http.Results Namespace

Return to top

InvalidModelStateResult Constructor (ModelStateDictionary, ApiController)

Initializes a new instance of the InvalidModelStateResult class.

Syntax

public InvalidModelStateResult(
    ModelStateDictionary modelState,
    ApiController controller
)
public:
InvalidModelStateResult(
    ModelStateDictionary^ modelState,
    ApiController^ controller
)
new : 
        modelState:ModelStateDictionary *
        controller:ApiController -> InvalidModelStateResult
Public Sub New (
    modelState As ModelStateDictionary,
    controller As ApiController
)

Parameters

Return to top

InvalidModelStateResult Constructor (ModelStateDictionary, Boolean, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>)

Initializes a new instance of the InvalidModelStateResult class.

Syntax

public InvalidModelStateResult(
    ModelStateDictionary modelState,
    bool includeErrorDetail,
    IContentNegotiator contentNegotiator,
    HttpRequestMessage request,
    IEnumerable<MediaTypeFormatter> formatters
)
public:
InvalidModelStateResult(
    ModelStateDictionary^ modelState,
    bool includeErrorDetail,
    IContentNegotiator^ contentNegotiator,
    HttpRequestMessage^ request,
    IEnumerable<MediaTypeFormatter^>^ formatters
)
new : 
        modelState:ModelStateDictionary *
        includeErrorDetail:bool *
        contentNegotiator:IContentNegotiator *
        request:HttpRequestMessage *
        formatters:IEnumerable<MediaTypeFormatter> -> InvalidModelStateResult
Public Sub New (
    modelState As ModelStateDictionary,
    includeErrorDetail As Boolean,
    contentNegotiator As IContentNegotiator,
    request As HttpRequestMessage,
    formatters As IEnumerable(Of MediaTypeFormatter)
)

Parameters

  • includeErrorDetail
    Type: System.Boolean

    true if the error should include exception messages; otherwise, false.

Return to top