Udostępnij za pośrednictwem


DefaultProblemDetailsFactory.CreateProblemDetails Metoda

Definicja

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

public override Microsoft.AspNetCore.Mvc.ProblemDetails CreateProblemDetails (Microsoft.AspNetCore.Http.HttpContext httpContext, int? statusCode = default, string? title = default, string? type = default, string? detail = default, string? instance = default);
override this.CreateProblemDetails : Microsoft.AspNetCore.Http.HttpContext * Nullable<int> * string * string * string * string -> Microsoft.AspNetCore.Mvc.ProblemDetails
Public Overrides Function CreateProblemDetails (httpContext As HttpContext, 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 ProblemDetails

Parametry

httpContext
HttpContext

HttpContext.

statusCode
Nullable<Int32>

Wartość Status.

title
String

Wartość Title.

type
String

Wartość Type.

detail
String

Wartość Detail.

instance
String

Wartość Instance.

Zwraca

Wystąpienie ProblemDetails.

Dotyczy