Partager via


ProblemDetailsFactory.CreateProblemDetails Méthode

Définition

Crée un ProblemDetails instance qui configure les valeurs par défaut en fonction des valeurs spécifiées dans 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

Paramètres

httpContext
HttpContext

L’HttpContextopérateur

statusCode
Nullable<Int32>

Valeur de Status.

title
String

Valeur de Title.

type
String

Valeur de Type.

detail
String

Valeur de Detail.

instance
String

Valeur de Instance.

Retours

Instance ProblemDetails.

S’applique à