Annotatable 類別

定義

支援讀取和寫入批註之型別的基類。

此類型通常是由資料庫提供者使用, (和其他延伸模組) 。 它通常不會用於應用程式程式碼中。

public class Annotatable : Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable
public class Annotatable : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable
type Annotatable = class
    interface IMutableAnnotatable
    interface IAnnotatable
type Annotatable = class
    inherit AnnotatableBase
    interface IMutableAnnotatable
    interface IReadOnlyAnnotatable
Public Class Annotatable
Implements IMutableAnnotatable
Public Class Annotatable
Inherits AnnotatableBase
Implements IMutableAnnotatable
繼承
Annotatable
繼承
Annotatable
衍生
實作

備註

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

建構函式

Annotatable()

支援讀取和寫入批註之型別的基類。

此類型通常是由資料庫提供者使用, (和其他延伸模組) 。 它通常不會用於應用程式程式碼中。

屬性

IsReadOnly

指出目前物件是否為唯讀。

(繼承來源 AnnotatableBase)
Item[String]

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

Item[String]

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

(繼承來源 AnnotatableBase)

方法

AddAnnotation(String, Annotation)

將批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

AddAnnotation(String, Annotation)

將批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

(繼承來源 AnnotatableBase)
AddAnnotation(String, Object)

將批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

AddAnnotation(String, Object)

將批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

(繼承來源 AnnotatableBase)
AddAnnotations(IEnumerable<IAnnotation>)

將批註加入至這個物件。

(繼承來源 AnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

將批註加入至這個物件。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

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

(繼承來源 AnnotatableBase)
AddRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

將執行時間批註加入至這個物件。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

將執行時間批註加入至這個物件。

(繼承來源 AnnotatableBase)
CreateAnnotation(String, Object)

建立新的批註。

CreateAnnotation(String, Object)

建立新的批註。

(繼承來源 AnnotatableBase)
CreateRuntimeAnnotation(String, Object)

建立新的執行時間批註。

(繼承來源 AnnotatableBase)
EnsureMutable()

如果模型是唯讀的,則會擲回 。

EnsureReadOnly()

如果模型不是唯讀,則會擲回 。

FindAnnotation(String)

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

FindAnnotation(String)

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

(繼承來源 AnnotatableBase)
FindRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotations()

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

GetAnnotations()

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

(繼承來源 AnnotatableBase)
GetOrAddAnnotation(String, Object)

將批註加入至這個物件,如果具有指定名稱的注釋已經存在,則傳回現有的批註。

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

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

(繼承來源 AnnotatableBase)
GetRuntimeAnnotations()

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

(繼承來源 AnnotatableBase)
OnAnnotationSet(String, Annotation, Annotation)

設定或移除批註時呼叫。

OnAnnotationSet(String, Annotation, Annotation)

設定或移除批註時呼叫。

(繼承來源 AnnotatableBase)
RemoveAnnotation(String)

從這個 物件中移除指定的注釋。

RemoveAnnotation(String)

從這個 物件中移除指定的注釋。

(繼承來源 AnnotatableBase)
RemoveRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
SetAnnotation(String, Annotation)

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

SetAnnotation(String, Annotation, Annotation)

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

SetAnnotation(String, Annotation, Annotation)

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

(繼承來源 AnnotatableBase)
SetAnnotation(String, Object)

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

SetAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
SetRuntimeAnnotation(String, Annotation, Annotation)

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

(繼承來源 AnnotatableBase)
SetRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)

明確介面實作

IAnnotatable.AddRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
IAnnotatable.FindAnnotation(String)

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

IAnnotatable.FindRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
IAnnotatable.GetAnnotations()

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

IAnnotatable.GetRuntimeAnnotations()

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

(繼承來源 AnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
IAnnotatable.SetRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
IMutableAnnotatable.AddAnnotation(String, Object)

將批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

IMutableAnnotatable.RemoveAnnotation(String)

從這個 物件中移除指定的注釋。

IMutableAnnotatable.SetOrRemoveAnnotation(String, Object)

設定儲存在指定名稱下的批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。 如果 null 已提供,則移除現有的批註。

IReadOnlyAnnotatable.FindAnnotation(String)

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

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

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

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.Item[String]

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

(繼承來源 AnnotatableBase)

擴充方法

AnnotationsToDebugString(IAnnotatable, Int32)

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

GetAnnotation(IAnnotatable, String)

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

AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>)

將批註加入物件。

GetAnnotation(IMutableAnnotatable, String)

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

GetOrAddAnnotation(IMutableAnnotatable, String, String)

取得具有指定索引鍵的現有注釋,如果不存在,則加入新的批註。

SetOrRemoveAnnotation(IMutableAnnotatable, String, Object)

設定儲存在指定名稱下的批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。 如果 null 已提供,則移除現有的批註。

適用於