Udostępnij za pośrednictwem


ProblemDetailsFactory.CreateValidationProblemDetails Metoda

Definicja

ValidationProblemDetails Tworzy wystąpienie, które konfiguruje wartości domyślne na podstawie wartości określonych w ApiBehaviorOptionspliku .

public abstract 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);
public abstract 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);
abstract member CreateValidationProblemDetails : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary * Nullable<int> * string * string * string * string -> Microsoft.AspNetCore.Mvc.ValidationProblemDetails
Public MustOverride 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

Parametry

httpContext
HttpContext

Element HttpContext.

modelStateDictionary
ModelStateDictionary

Element ModelStateDictionary.

statusCode
Nullable<Int32>

Wartość elementu Status.

title
String

Wartość elementu Title.

type
String

Wartość elementu Type.

detail
String

Wartość elementu Detail.

instance
String

Wartość elementu Instance.

Zwraca

Wystąpienie elementu ValidationProblemDetails.

Dotyczy