Partilhar via


ProblemDetailsFactory.CreateProblemDetails Método

Definição

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

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

O HttpContext.

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 ProblemDetails.

Aplica-se a