DbCommandTreeInterceptionContext 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表與呼叫實 IDbCommandTreeInterceptor 作相關的情境資訊。
public class DbCommandTreeInterceptionContext : System.Data.Entity.Infrastructure.Interception.DbInterceptionContext
type DbCommandTreeInterceptionContext = class
inherit DbInterceptionContext
Public Class DbCommandTreeInterceptionContext
Inherits DbInterceptionContext
- 繼承
備註
此類別的實例在上下文資訊中公開不可變。 要補充上下文資訊,請使用其中一種 With...或是 As...建立包含新資訊的新攔截上下文的方法。
建構函式
| 名稱 | Description |
|---|---|
| DbCommandTreeInterceptionContext() |
建構一個沒有狀態的新事物 DbCommandTreeInterceptionContext 。 |
| DbCommandTreeInterceptionContext(DbInterceptionContext) |
透過從給定攔截上下文複製狀態來建立新的 DbCommandTreeInterceptionContext 狀態。 另見 Clone() |
屬性
| 名稱 | Description |
|---|---|
| DbContexts |
取得 DbContext 所有與此攔截上下文相關的實例。 (繼承來源 DbInterceptionContext) |
| IsAsync |
若操作是非同步執行,則為真;否則為假。 (繼承來源 DbInterceptionContext) |
| ObjectContexts |
取得 ObjectContext 所有與此攔截上下文相關的實例。 (繼承來源 DbInterceptionContext) |
| OriginalResult |
由 Entity Framework 建立的原始樹狀結構。 攔截器可以更改 Result 屬性以改變將使用的樹狀結構,但 的 永遠 OriginalResult 是由 Entity Framework 建立的那棵樹。 |
| Result |
Entity Framework 將使用的指令樹。 這起始是屬性中的 OriginalResult 樹,但攔截者可以設定以改變實體框架將使用的樹。 |
| UserState |
已淘汰.
取得或設定包含與操作相關的任意使用者指定狀態資訊的值。 |
方法
| 名稱 | Description |
|---|---|
| AsAsync() |
建立一個包含此攔截上下文IsAsync中所有上下文資訊的新文件DbCommandTreeInterceptionContext,該標記設為 true。 |
| Clone() |
在建立攔截上下文副本以新增狀態時,呼叫此方法。 使用此方法代替直接呼叫建構子,可確保虛擬派遣,使新型態擁有與被克隆上下文相同的型態(及任何專用狀態)。 |
| Equals(Object) |
代表與呼叫實 IDbCommandTreeInterceptor 作相關的情境資訊。 |
| FindUserState(String) |
取得包含與操作相關的任意使用者指定狀態資訊的值。 |
| GetHashCode() |
代表與呼叫實 IDbCommandTreeInterceptor 作相關的情境資訊。 |
| GetType() |
取得目前實例的 Type。 |
| SetUserState(String, Object) |
設定一個包含與操作相關的任意使用者指定狀態資訊的值。 |
| ToString() |
代表與呼叫實 IDbCommandTreeInterceptor 作相關的情境資訊。 |
| WithDbContext(DbContext) |
建立 DbCommandTreeInterceptionContext 一個新 ,包含此攔截上下文中所有上下文資訊,並加上給定 DbContext的 。 |
| WithObjectContext(ObjectContext) |
建立 DbCommandTreeInterceptionContext 一個新 ,包含此攔截上下文中所有上下文資訊,並加上給定 ObjectContext的 。 |