ProblemDetailsFactory.CreateProblemDetails 方法

定义

创建一个 ProblemDetails 实例,该实例基于 中指定的 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

参数

httpContext
HttpContext

HttpContext

statusCode
Nullable<Int32>

的值 Status

title
String

的值 Title

type
String

的值 Type

detail
String

的值 Detail

instance
String

的值 Instance

返回

ProblemDetails 实例。

适用于