Поделиться через


DefaultProblemDetailsFactory.CreateValidationProblemDetails Метод

Определение

Создает экземпляр ValidationProblemDetails, который настраивает значения по умолчанию на основе значений, указанных в 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

Параметры

httpContext
HttpContext

HttpContext.

statusCode
Nullable<Int32>

Значение для Status.

title
String

Значение для Title.

type
String

Значение для Type.

detail
String

Значение для Detail.

instance
String

Значение для Instance.

Возвращаемое значение

Экземпляр ValidationProblemDetails.

Применяется к