NotFoundObjectResult 類別

定義

ObjectResult,執行時會產生 「找不到」 (404) 回應。

public ref class NotFoundObjectResult : Microsoft::AspNetCore::Mvc::ObjectResult
public class NotFoundObjectResult : Microsoft.AspNetCore.Mvc.ObjectResult
[Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(404)]
public class NotFoundObjectResult : Microsoft.AspNetCore.Mvc.ObjectResult
type NotFoundObjectResult = class
    inherit ObjectResult
[<Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(404)>]
type NotFoundObjectResult = class
    inherit ObjectResult
Public Class NotFoundObjectResult
Inherits ObjectResult
繼承
NotFoundObjectResult
屬性

建構函式

NotFoundObjectResult(Object)

建立新的 NotFoundObjectResult 執行個體。

屬性

ContentTypes

取得或設定 MediaTypeCollection

(繼承來源 ObjectResult)
DeclaredType

取得或設定宣告的類型。

(繼承來源 ObjectResult)
Formatters

IOutputFormatter 集合。

(繼承來源 ObjectResult)
StatusCode

取得或設定 HTTP 狀態碼。

(繼承來源 ObjectResult)
Value

物件結果。

(繼承來源 ObjectResult)

方法

ExecuteResult(ActionContext)

同步執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。

(繼承來源 ActionResult)
ExecuteResultAsync(ActionContext)

以非同步方式執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。

(繼承來源 ObjectResult)
OnFormatting(ActionContext)

這個方法會在格式器寫入輸出資料流程之前呼叫。

(繼承來源 ObjectResult)

適用於