ControllerBase.Problem Metoda

Definice

Přetížení

Problem(String, String, Nullable<Int32>, String, String)

Zdroj:
ControllerBase.cs

Vytvoří ObjectResult, která vytvoří odpověď ProblemDetails.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult Problem (string detail = default, string instance = default, int? statusCode = default, string title = default, string type = default);
C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult Problem (string? detail = default, string? instance = default, int? statusCode = default, string? title = default, string? type = default);
C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult Problem (string? detail, string? instance, int? statusCode, string? title, string? type);

Parametry

detail
String

Hodnota pro Detail.

instance
String

Hodnota pro Instance.

statusCode
Nullable<Int32>

Hodnota pro Status.

title
String

Hodnota pro Title.

type
String

Hodnota pro Type.

Návraty

Vytvořená ObjectResult pro odpověď.

Atributy

Platí pro

ASP.NET Core 9.0 a další verze
Produkt Verze
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

Problem(String, String, Nullable<Int32>, String, String, IDictionary<String,Object>)

Vytvoří ObjectResult, která vytvoří odpověď ProblemDetails.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult Problem (string? detail = default, string? instance = default, int? statusCode = default, string? title = default, string? type = default, System.Collections.Generic.IDictionary<string,object?>? extensions = default);

Parametry

detail
String

Hodnota pro Detail.

instance
String

Hodnota pro Instance.

statusCode
Nullable<Int32>

Hodnota pro Status.

title
String

Hodnota pro Title.

type
String

Hodnota pro Type.

extensions
IDictionary<String,Object>

Hodnota pro Extensions.

Návraty

Vytvořená ObjectResult pro odpověď.

Atributy

Platí pro

ASP.NET Core 9.0
Produkt Verze
ASP.NET Core 9.0