Partilhar via


DefaultProblemDetailsFactory.CreateValidationProblemDetails Método

Definição

Cria uma instância de ValidationProblemDetails que configura padrões com base nos valores especificados em ApiBehaviorOptions.

public override Microsoft.AspNetCore.Mvc.ValidationProblemDetails CreateValidationProblemDetails (Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelStateDictionary, int? statusCode = default, string? title = default, string? type = default, string? detail = default, string? instance = default);
override this.CreateValidationProblemDetails : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary * Nullable<int> * string * string * string * string -> Microsoft.AspNetCore.Mvc.ValidationProblemDetails
Public Overrides Function CreateValidationProblemDetails (httpContext As HttpContext, modelStateDictionary As ModelStateDictionary, Optional statusCode As Nullable(Of Integer) = Nothing, Optional title As String = Nothing, Optional type As String = Nothing, Optional detail As String = Nothing, Optional instance As String = Nothing) As ValidationProblemDetails

Parâmetros

httpContext
HttpContext

O HttpContext.

modelStateDictionary
ModelStateDictionary

O ModelStateDictionary.

statusCode
Nullable<Int32>

O valor de Status.

title
String

O valor de Title.

type
String

O valor de Type.

detail
String

O valor de Detail.

instance
String

O valor de Instance.

Retornos

A instância ValidationProblemDetails.

Aplica-se a