PropertyBaseExtensions 類別

定義

IReadOnlyPropertyBase 的擴充方法。

public static class PropertyBaseExtensions
type PropertyBaseExtensions = class
Public Module PropertyBaseExtensions
繼承
PropertyBaseExtensions

方法

Format(IEnumerable<IReadOnlyPropertyBase>, Boolean)

建立指定屬性的格式字串表示,例如在擲回索引鍵、索引等例外狀況時很有用。使用 屬性。

GetCurrentValueComparer(IPropertyBase)

取得 , IComparer<T> 用於比較追蹤 IUpdateEntry 專案中的值。

GetFieldName(IPropertyBase)

取得此屬性的支援欄位名稱,如果不知道支援欄位,則 null 為 。

GetGetter(IPropertyBase)

IClrPropertyGetter取得 ,用於讀取這個屬性的值。

請注意,針對陰影屬性呼叫這個方法 () IsShadowProperty(IPropertyBase) 是一個錯誤,因為這類屬性沒有相關聯的 MemberInfo

GetIndex(IPropertyBase)

取得這個屬性的屬性索引。

GetMemberInfo(IPropertyBase, Boolean, Boolean)

取得 或 PropertyInfoFieldInfo ,這個值應該用來取得或設定指定屬性的值。

請注意,針對陰影屬性呼叫這個方法 () IsShadowProperty(IPropertyBase) 是一個錯誤,因為這類屬性沒有相關聯的 MemberInfo

GetPropertyAccessMode(IPropertyBase)

PropertyAccessMode取得用於這個屬性的 。 null 表示正在使用預設屬性存取模式。

IsIndexerProperty(IPropertyBase)

取得值,指出這個 是否為索引子屬性。 索引子屬性是透過實體類別上的索引子存取的屬性。

IsShadowProperty(IPropertyBase)
已淘汰.

取得值,指出這個 是否為陰影屬性。 陰影屬性是實體類別中沒有對應屬性的陰影屬性。 屬性的目前值會儲存在 中 ChangeTracker ,而不是儲存在實體類別的實例中。

適用於