Compartir a través de


DefaultProblemDetailsFactory.CreateProblemDetails Método

Definición

Crea una instancia de ProblemDetails que configura los valores predeterminados en función de los valores especificados en 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

Parámetros

httpContext
HttpContext

El HttpContext.

statusCode
Nullable<Int32>

Valor de Status.

title
String

Valor de Title.

type
String

Valor de Type.

detail
String

Valor de Detail.

instance
String

Valor de Instance.

Devoluciones

Instancia de ProblemDetails.

Se aplica a