IAnnotatable 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個揭露建置時與執行時註解的類別。 註解允許在物件上儲存任意的元資料。
此介面通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。
public interface IAnnotatable
public interface IAnnotatable : Microsoft.EntityFrameworkCore.Infrastructure.IReadOnlyAnnotatable
type IAnnotatable = interface
type IAnnotatable = interface
interface IReadOnlyAnnotatable
Public Interface IAnnotatable
Public Interface IAnnotatable
Implements IReadOnlyAnnotatable
- 衍生
- 實作
備註
更多資訊與範例請參見 資料庫提供者與擴充功能的實作 。
屬性
| 名稱 | Description |
|---|---|
| Item[String] |
取得帶有名稱的值註解,若不存在則回 |
方法
| 名稱 | Description |
|---|---|
| AddRuntimeAnnotation(String, Object) |
為此物件新增執行時註解。 如果已有指定名稱的註解存在,則會拋出。 |
| AnnotationsToDebugString(Int32) |
取得物件上所有宣告註解的除錯字串。 (繼承來源 IReadOnlyAnnotatable) |
| FindAnnotation(String) |
取得帶有名字的註解,若不存在則回 |
| FindRuntimeAnnotation(String) |
取得帶有名稱的執行時註解,若不存在則回 |
| FindRuntimeAnnotationValue(String) |
取得執行時註解的值,若名稱不存在則回 |
| GetAnnotation(String) |
取得帶有名稱的註解,若不存在則拋出。 (繼承來源 IReadOnlyAnnotatable) |
| GetAnnotations() |
取得目前物件的所有註解。 |
| GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg) |
取得帶有名稱的執行時註解值,若不存在則加入該註解。 |
| GetRuntimeAnnotations() |
取得目前物件上的所有執行時註解。 |
| RemoveRuntimeAnnotation(String) |
移除該物件中給定的執行時註解。 |
| SetRuntimeAnnotation(String, Object) |
設定在指定鍵值下儲存的執行時註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 |
擴充方法
| 名稱 | Description |
|---|---|
| AnnotationsToDebugString(IAnnotatable, Int32) |
取得物件上所有宣告註解的除錯字串。 |
| GetAnnotation(IAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |