Class XPClassInfo
- Namespace
- DevExpress.Xpo.Metadata
- Assembly
- DevExpress.Xpo.v24.1.dll
Serves as a base for classes that provide metadata information for a class.
public abstract class XPClassInfo : XPTypeInfo, IXPClassInfoProvider, IXPDictionaryProvider
- Inheritance
-
XPClassInfo
- Implements
- Derived
- Inherited Members
Constructors
XPClassInfo(XPDictionary)
Initializes a new instance of the XPClassInfo class with the specified XPClassInfo.Dictionary property.
public XPClassInfo(XPDictionary dictionary)
Parameters
dictionary
XPDictionaryAn XPDictionary object which contains the new XPClassInfo object. This value is assigned to the XPClassInfo.Dictionary property.
Fields
EmptyClassInfos
protected static XPClassInfo[] EmptyClassInfos
Field Value
optimisticLockingCache
protected XPClassInfo.OptimisticLockingCacheItem optimisticLockingCache
Field Value
Properties
AssemblyName
Gets the name of the assembly that the class is declared in.
public abstract string AssemblyName { get; }
Property Value
AssociationListProperties
Gets a list of members that represent the “many” side of the association.
public IEnumerable AssociationListProperties { get; }
Property Value
- IEnumerable
The list of members that represent the “many” side of the association.
BaseClass
When implemented in a derived class, gets the metadata information of the base class.
public abstract XPClassInfo BaseClass { get; }
Property Value
- XPClassInfo
An XPClassInfo object which provides the metadata information of the base class. null (Nothing in Visual Basic) if the XPClassInfo object provides a description of the class which is the root in a class hierarchy.
CanGetByClassType
This property is intended for internal use.
public virtual bool CanGetByClassType { get; }
Property Value
ClassType
When implemented in a derived class, gets the type of the class which is described by the current XPClassInfo object.
public abstract Type ClassType { get; }
Property Value
CollectionProperties
Gets the IEnumerable interface which populates XPMemberInfo objects for the XPCollection type properties.
public IEnumerable CollectionProperties { get; }
Property Value
- IEnumerable
The IEnumerable interface which populates XPMemberInfo objects for XPCollection type properties.
Dictionary
Gets the XPDictionary object which the current XPClassInfo object belongs to.
public XPDictionary Dictionary { get; }
Property Value
- XPDictionary
An XPDictionary object which contains the current XPClassInfo object.
FullName
When implemented in a derived class, returns the full name of the class.
public abstract string FullName { get; }
Property Value
HasDescendants
Gets whether the class described by the current XPClassInfo object has descendants.
public bool HasDescendants { get; }
Property Value
- bool
true if the class has descendants; otherwise, false.
IdClass
Gets the metadata information for the persistent class which provides the key value for the current object.
public XPClassInfo IdClass { get; }
Property Value
- XPClassInfo
An XPClassInfo object that contains metadata information for the persistent class which provides the key value for the current object.
IsAbstract
Determines whether an instance of the current type is abstract.
public virtual bool IsAbstract { get; }
Property Value
- bool
true if an instance of the current type is abstract; otherwise, false.
IsInterface
protected virtual bool IsInterface { get; }
Property Value
KeyProperty
Gets information on the key property or key field.
public XPMemberInfo KeyProperty { get; }
Property Value
- XPMemberInfo
An XPMemberInfo object which provides information about the key property or key field. If null (Nothing in Visual Basic) a KeyPropertyAbsentException is thrown.
Members
Gets a collection of XPMemberInfo objects that are owned by the current persistent class metadata information and all its ancestors.
public ICollection<XPMemberInfo> Members { get; }
Property Value
- ICollection<XPMemberInfo>
An array of XPMemberInfo objects that are owned by the current persistent class metadata information and all its ancestors.
NullableBehavior
Determines if nullable columns should be created when updating the database schema for the persistent class described by the current XPClassInfo object.
public NullableBehavior NullableBehavior { get; }
Property Value
- NullableBehavior
A NullableBehavior enumeration value specifying if a nullable column should be created when updating the database schema.
ObjectProperties
Returns the IEnumerable interface which populates XPMemberInfo objects for properties with the IXPSimpleObject interface declaration.
public IEnumerable ObjectProperties { get; }
Property Value
- IEnumerable
The IEnumerable interface which populates XPMemberInfo objects for properties with the IXPSimpleObject interface declaration.
OptimisticLockField
Gets the metadata of the member that represents the optimistic lock field.
public XPMemberInfo OptimisticLockField { get; }
Property Value
- XPMemberInfo
An XPMemberInfo object that represents member metadata.
OptimisticLockFieldInDataLayer
This member supports the .NET Framework infrastructure and cannot be used directly from your code.
public XPMemberInfo OptimisticLockFieldInDataLayer { get; }
Property Value
OptimisticLockFieldInDataLayerName
This member supports the .NET Framework infrastructure and cannot be used directly from your code.
public string OptimisticLockFieldInDataLayerName { get; }
Property Value
OptimisticLockFieldName
Gets the name of the system field that is used to control object locking for objects that have the object locking option enabled.
public string OptimisticLockFieldName { get; }
Property Value
- string
A string value that specifies the system field’s name.
OptimisticLockingBehavior
Specifies the persistent object’s locking behavior.
public OptimisticLockingBehavior OptimisticLockingBehavior { get; }
Property Value
- OptimisticLockingBehavior
An OptimisticLockingBehavior enumeration value that specifies the locking behavior.
OptimisticLockingReadBehavior
Specifies how XPO behaves when reloading a changed object.
public OptimisticLockingReadBehavior OptimisticLockingReadBehavior { get; }
Property Value
- OptimisticLockingReadBehavior
An OptimisticLockingReadBehavior enumeration value that specifies how XPO behaves when reloading changed objects (objects with different versions).
OwnMembers
Gets a collection of XPMemberInfo objects that provide metadata information on all the members owned by the class.
public abstract ICollection<XPMemberInfo> OwnMembers { get; }
Property Value
- ICollection<XPMemberInfo>
An array of XPMemberInfo objects.
PersistentBaseClass
Gets the information about the nearest persistent parent class in the inheritance hierarchy.
public XPClassInfo PersistentBaseClass { get; }
Property Value
- XPClassInfo
An XPClassInfo object which corresponds to the nearest persistent parent class in the inheritance hierarchy.
PersistentProperties
Gets the collection of persistent properties and fields owned by the current persistent class metadata information.
public IEnumerable PersistentProperties { get; }
Property Value
- IEnumerable
A collection of XPMemberInfo objects owned by the current persistent class metadata information.
RealInstanceType
protected virtual Type RealInstanceType { get; }
Property Value
SupportObjectsReferencesFromCustomMembers
protected virtual bool SupportObjectsReferencesFromCustomMembers { get; }
Property Value
Table
Gets the DevExpress.Xpo.DB.DBTable object which the public properties and public fields are saved in.
public DBTable Table { get; }
Property Value
- DBTable
A DevExpress.Xpo.DB.DBTable object which represents the table that the public properties and public fields are saved in.
TableMapType
Gets a value that specifies which table persistent properties and fields are saved to.
public MapInheritanceType TableMapType { get; }
Property Value
- MapInheritanceType
A MapInheritanceType enumeration value that specifies which table persistent properties and fields are saved to.
TableName
Gets the name of the table in the data layer in which the object’s data is stored.
public string TableName { get; }
Property Value
TrackPropertiesModifications
Specifies whether or not the persistent object properties modifications are tracked.
public bool? TrackPropertiesModifications { get; }
Property Value
- bool?
true, if the persistent objects’ properties modifications are tracked; otherwise, false.
Methods
AddMember(XPMemberInfo)
When overridden in a derived class, adds the specified member’s metadata information to the XPClassInfo.Members collection.
public virtual void AddMember(XPMemberInfo newMember)
Parameters
newMember
XPMemberInfoAn XPMemberInfo object to add.
CheckAbstractReference()
This member supports the XPO Framework infrastructure and is not intended to be used directly from your code.
public void CheckAbstractReference()
CheckMembers()
protected void CheckMembers()
ClearModifications(object)
Clears modifications made with the specified persistent object.
public abstract void ClearModifications(object theObject)
Parameters
theObject
objectA persistent object whose modifications will be cleared.
CreateMember(string, XPClassInfo, params Attribute[])
Creates a new member metadata which is referenced to the specified XPClassInfo object.
public XPCustomMemberInfo CreateMember(string propertyName, XPClassInfo referenceType, params Attribute[] attributes)
Parameters
propertyName
stringA string value which specifies the name of the new member.
referenceType
XPClassInfoAn XPClassInfo object which provides the metadata of the class that the new property references.
attributes
Attribute[]An array of Attribute objects that represent the new member’s attributes.
Returns
- XPCustomMemberInfo
An XPCustomMemberInfo descendant which provides the new member’s metadata.
CreateMember(string, XPClassInfo, bool, params Attribute[])
Creates a new member metadata which is referenced to the specified XPClassInfo object.
public XPCustomMemberInfo CreateMember(string propertyName, XPClassInfo referenceType, bool nonPersistent, params Attribute[] attributes)
Parameters
propertyName
stringA string value which specifies the name of the new member.
referenceType
XPClassInfoAn XPClassInfo object that provides the metadata of the class which the new property references.
nonPersistent
booltrue if the new member is non persistent; otherwise, false.
attributes
Attribute[]An array of Attribute objects that represent the attributes of the new member.
Returns
- XPCustomMemberInfo
An XPCustomMemberInfo descendant which provides the new member’s metadata.
CreateMember(string, XPClassInfo, bool, bool, params Attribute[])
Creates a new member metadata which references the specified XPClassInfo object.
public XPCustomMemberInfo CreateMember(string propertyName, XPClassInfo referenceType, bool nonPersistent, bool nonPublic, params Attribute[] attributes)
Parameters
propertyName
stringA string value which specifies the name of the new member.
referenceType
XPClassInfoAn XPClassInfo object that provides the metadata of the class which the new property references.
nonPersistent
booltrue if the new member is not persistent; otherwise, false.
nonPublic
booltrue if the new member isn’t public; otherwise, false.
attributes
Attribute[]An array of Attribute objects that represent the new member’s attributes.
Returns
- XPCustomMemberInfo
An XPCustomMemberInfo descendant which provides the new member’s metadata
CreateMember(string, Type, params Attribute[])
Creates a new member metadata.
public XPCustomMemberInfo CreateMember(string propertyName, Type propertyType, params Attribute[] attributes)
Parameters
propertyName
stringA string value which specifies the name of the new member.
propertyType
TypeA Type descendant which represents the type of the new member. The created member type will be nullable, i.e if you pass bool, the type will be Nullable<bool>.
attributes
Attribute[]An array of Attribute objects that represent attributes of the new member.
Returns
- XPCustomMemberInfo
An XPCustomMemberInfo descendant which provides the new member’s metadata.
CreateMember(string, Type, bool, params Attribute[])
Creates a new member metadata.
public XPCustomMemberInfo CreateMember(string propertyName, Type propertyType, bool nonPersistent, params Attribute[] attributes)
Parameters
propertyName
stringA string value which specifies the name of the new member.
propertyType
TypeA Type descendant which represents the type of the new member. The created member type will be nullable, i.e if you pass bool, the type will be Nullable<bool>.
nonPersistent
booltrue if the new member is not persistent; otherwise, false.
attributes
Attribute[]An array of Attribute objects that represent the attributes of the new member.
Returns
- XPCustomMemberInfo
An XPCustomMemberInfo descendant which provides the new member’s metadata.
CreateMember(string, Type, bool, bool, params Attribute[])
Creates a new member metadata.
public XPCustomMemberInfo CreateMember(string propertyName, Type propertyType, bool nonPersistent, bool nonPublic, params Attribute[] attributes)
Parameters
propertyName
stringA string value which specifies the name of the new member. The created member type will be nullable, i.e if you pass bool, the type will be Nullable<bool>.
propertyType
TypeA Type descendant which represents the type of the new member. The created member type will be nullable, i.e if you pass bool, the type will be Nullable<bool>.
nonPersistent
booltrue if the new member is not persistent; otherwise, false.
nonPublic
booltrue if the new member isn’t public; otherwise, false.
attributes
Attribute[]An array of Attribute objects that represent the attributes of the new member.
Returns
- XPCustomMemberInfo
An XPCustomMemberInfo descendant which provides the new member’s metadata.
CreateNewObject(Session)
Creates a new persistent object.
public virtual object CreateNewObject(Session session)
Parameters
session
SessionA Session object which represents the session. This property is assigned to the object’s PersistentBase.Session property.
Returns
- object
An object which is the newly created persistent object.
CreateObject(Session)
Instantiates an existing persistent object upon loading it from the database.
public virtual object CreateObject(Session session)
Parameters
session
SessionA Session object which represents the session. This property is assigned to the object’s PersistentBase.Session property.
Returns
- object
An object which is the instantiated persistent object.
CreateObjectInstance(Session, XPClassInfo)
protected abstract object CreateObjectInstance(Session session, XPClassInfo instantiationClassInfo)
Parameters
session
SessioninstantiationClassInfo
XPClassInfo
Returns
DropCache()
protected override void DropCache()
FindMember(string)
Returns information on the member with the specified name.
public XPMemberInfo FindMember(string memberName)
Parameters
Returns
- XPMemberInfo
An XPMemberInfo object which represents member metadata. null (Nothing in Visual Basic) if a member with the specified name isn’t found.
GetCriteriaCompilerDescriptor(Session)
This method is intended for internal use.
public CriteriaCompilerDescriptor GetCriteriaCompilerDescriptor(Session session)
Parameters
session
Session
Returns
- CriteriaCompilerDescriptor
GetDefaultTableName()
protected virtual string GetDefaultTableName()
Returns
GetEvaluatorContextDescriptor()
This member supports the XPO Framework infrastructure and is not intended to be used directly from your code.
public EvaluatorContextDescriptor GetEvaluatorContextDescriptor()
Returns
- EvaluatorContextDescriptor
GetEvaluatorContextDescriptorInTransaction()
This member supports the XPO Framework infrastructure and is not intended to be used directly from your code.
public EvaluatorContextDescriptor GetEvaluatorContextDescriptorInTransaction()
Returns
- EvaluatorContextDescriptor
GetId(object)
Gets the value of the key property.
public object GetId(object obj)
Parameters
obj
objectAn object which represents the persistent object.
Returns
- object
An object which represents the value of the key property.
GetMember(string)
Returns information on the member with the specified name.
public XPMemberInfo GetMember(string memberName)
Parameters
Returns
- XPMemberInfo
An XPMemberInfo object which represents member metadata. If a member with the specified name isn’t found, an exception is thrown.
GetPersistentMember(string)
Returns information on the persistent member with the specified name.
public XPMemberInfo GetPersistentMember(string memberName)
Parameters
Returns
- XPMemberInfo
An XPMemberInfo object which represents member metadata. null (Nothing in Visual Basic) if the member with the specified name isn’t found.
GetPropertiesListForUpdateInsert(Session, object, bool, bool)
This member supports the internal infrastructure and is not intended to be used directly from your code.
public static MemberInfoCollection GetPropertiesListForUpdateInsert(Session session, object theObject, bool isUpdate, bool addDelayedReference)
Parameters
Returns
GetRefTypes()
This member supports the .NET Framework infrastructure and cannot be used directly from your code.
public ICollection GetRefTypes()
Returns
GetShortAssemblyName(Assembly)
Gets the short name of the specified assembly.
public static string GetShortAssemblyName(Assembly assembly)
Parameters
assembly
AssemblyThe assembly.
Returns
- string
A string value that represents the specified assembly’s short name.
GetTableName()
protected virtual string GetTableName()
Returns
HasModifications(object)
Checks if there are modifications with the specified persistent object.
public abstract bool HasModifications(object theObject)
Parameters
theObject
objectA persistent object to be checked for modifications.
Returns
- bool
true, if there are modifications; otherwise - false;
InitServiceMembers()
protected void InitServiceMembers()
IsAssignableTo(XPClassInfo)
Determines whether an instance of the current type can be assigned to an instance of the specified type.
public bool IsAssignableTo(XPClassInfo classInfo)
Parameters
classInfo
XPClassInfoAn XPClassInfo object which describes the type to compare with the current type.
Returns
- bool
true if an instance of the current type can be assigned to an instance of the specified type; otherwise, false.
QueryOwnMember(string)
protected virtual XPMemberInfo QueryOwnMember(string memberName)
Parameters
memberName
string
Returns
ToString()
Returns a string that represents the full name of the class.
public override string ToString()