ExceptionContext 類別

定義

例外狀況篩選的內容,例如 IExceptionFilterIAsyncExceptionFilter 實作。

public ref class ExceptionContext : Microsoft::AspNetCore::Mvc::Filters::FilterContext
public class ExceptionContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext
type ExceptionContext = class
    inherit FilterContext
Public Class ExceptionContext
Inherits FilterContext
繼承

建構函式

ExceptionContext(ActionContext, IList<IFilterMetadata>)

具現化新的 ExceptionContext 實例。

屬性

ActionDescriptor

取得或設定 ActionDescriptor 所選取動作的 。

(繼承來源 ActionContext)
Exception

取得或設定在執行動作時攔截的 Exception

ExceptionDispatchInfo

取得或設定 ExceptionDispatchInfoException ,如果擷取這項資訊。

ExceptionHandled

取得或設定已 Exception 處理的指示。

Filters

取得所有適用的 IFilterMetadata 實作。

(繼承來源 FilterContext)
HttpContext

取得或設定 HttpContext 目前要求的 。

(繼承來源 ActionContext)
ModelState

取得 ModelStateDictionary

(繼承來源 ActionContext)
Result

取得或設定 IActionResult

RouteData

取得或設定 RouteData 目前要求的 。

(繼承來源 ActionContext)

方法

FindEffectivePolicy<TMetadata>()

傳回套用至相關聯 FilterContext 動作之類型 TMetadata 之最有效 (最特定) 原則。

(繼承來源 FilterContext)
IsEffectivePolicy<TMetadata>(TMetadata)

傳回值,指出提供的 IFilterMetadata 是否為最有效原則 (套用至相關聯 FilterContext 動作的最特定) 。

(繼承來源 FilterContext)

適用於