IAnnotatable 介面

定義

公開建置時間和執行時間批註的類別。 批註允許任意中繼資料儲存在 物件上。

資料庫提供者通常會使用這個介面, (和其他延伸模組) 。 它通常不會用於應用程式程式碼中。

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
衍生
實作

備註

如需詳細資訊和範例,請參閱 資料庫提供者和延伸模組的實作

屬性

Item[String]

取得具有指定名稱的值批註,如果不存在,則 null 傳回 。

方法

AddRuntimeAnnotation(String, Object)

將執行時間批註新增至這個 物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

AnnotationsToDebugString(Int32)

取得 物件上宣告之所有注釋的偵錯字串。

(繼承來源 IReadOnlyAnnotatable)
FindAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則傳 null 回 。

FindRuntimeAnnotation(String)

取得具有指定名稱的執行時間批註,如果不存在,則 null 傳回 。

FindRuntimeAnnotationValue(String)

取得具有指定名稱的執行時間批註值,如果不存在,則傳 null 回 。

GetAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則會擲回。

(繼承來源 IReadOnlyAnnotatable)
GetAnnotations()

取得目前 物件上的所有批註。

GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

取得具有指定名稱的執行時間批註值,如果不存在,請加以新增。

GetRuntimeAnnotations()

取得目前 物件上的所有執行時間批註。

RemoveRuntimeAnnotation(String)

從這個 物件中移除指定的執行時間批註。

SetRuntimeAnnotation(String, Object)

設定儲存在指定索引鍵底下的執行時間批註。 如果具有指定名稱的注釋已經存在,則會覆寫現有的批註。

擴充方法

AnnotationsToDebugString(IAnnotatable, Int32)

取得 物件上宣告之所有注釋的偵錯字串。

GetAnnotation(IAnnotatable, String)

取得具有指定名稱的注釋,如果不存在,則會擲回。

適用於