ControllerBase.Problem 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Problem(String, String, Nullable<Int32>, String, String)
建立產生 ProblemDetails 回應的 ObjectResult。
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult Problem(string? detail, string? instance, int? statusCode, string? title, string? type);
[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);
[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);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Problem : string * string * Nullable<int> * string * string -> Microsoft.AspNetCore.Mvc.ObjectResult
override this.Problem : string * string * Nullable<int> * string * string -> Microsoft.AspNetCore.Mvc.ObjectResult
Public Overridable Function Problem (detail As String, instance As String, statusCode As Nullable(Of Integer), title As String, type As String) As ObjectResult
Public Overridable Function Problem (Optional detail As String = Nothing, Optional instance As String = Nothing, Optional statusCode As Nullable(Of Integer) = Nothing, Optional title As String = Nothing, Optional type As String = Nothing) As ObjectResult
參數
傳回
為回應建立的 ObjectResult。
- 屬性
適用於
Problem(String, String, Nullable<Int32>, String, String, IDictionary<String,Object>)
建立產生 ProblemDetails 回應的 ObjectResult。
[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);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Problem : string * string * Nullable<int> * string * string * System.Collections.Generic.IDictionary<string, obj> -> Microsoft.AspNetCore.Mvc.ObjectResult
override this.Problem : string * string * Nullable<int> * string * string * System.Collections.Generic.IDictionary<string, obj> -> Microsoft.AspNetCore.Mvc.ObjectResult
Public Overridable Function Problem (Optional detail As String = Nothing, Optional instance As String = Nothing, Optional statusCode As Nullable(Of Integer) = Nothing, Optional title As String = Nothing, Optional type As String = Nothing, Optional extensions As IDictionary(Of String, Object) = Nothing) As ObjectResult
參數
- extensions
- IDictionary<String,Object>
Extensions的值。
傳回
為回應建立的 ObjectResult。
- 屬性