Table of Contents

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 XPDictionary

An 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

XPClassInfo[]

optimisticLockingCache

protected XPClassInfo.OptimisticLockingCacheItem optimisticLockingCache

Field Value

XPClassInfo.OptimisticLockingCacheItem

Properties

AssemblyName

Gets the name of the assembly that the class is declared in.

public abstract string AssemblyName { get; }

Property Value

string

A string value which specifies the assembly name that the class is declared in.

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

bool

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

Type

A Type descendant which represents the type of the described class.

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

string

A string value which specifies the full name of the class.

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

bool

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

XPMemberInfo

OptimisticLockFieldInDataLayerName

This member supports the .NET Framework infrastructure and cannot be used directly from your code.

public string OptimisticLockFieldInDataLayerName { get; }

Property Value

string

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

Type

SupportObjectsReferencesFromCustomMembers

protected virtual bool SupportObjectsReferencesFromCustomMembers { get; }

Property Value

bool

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

string

A string value which specifies the table’s name.

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 XPMemberInfo

An 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 object

A 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 string

A string value which specifies the name of the new member.

referenceType XPClassInfo

An 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 string

A string value which specifies the name of the new member.

referenceType XPClassInfo

An XPClassInfo object that provides the metadata of the class which the new property references.

nonPersistent bool

true 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 string

A string value which specifies the name of the new member.

referenceType XPClassInfo

An XPClassInfo object that provides the metadata of the class which the new property references.

nonPersistent bool

true if the new member is not persistent; otherwise, false.

nonPublic bool

true 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 string

A string value which specifies the name of the new member.

propertyType Type

A 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 string

A string value which specifies the name of the new member.

propertyType Type

A 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 bool

true 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 string

A 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 Type

A 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 bool

true if the new member is not persistent; otherwise, false.

nonPublic bool

true 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 Session

A 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 Session

A 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 Session
instantiationClassInfo XPClassInfo

Returns

object

DropCache()

protected override void DropCache()

FindMember(string)

Returns information on the member with the specified name.

public XPMemberInfo FindMember(string memberName)

Parameters

memberName string

A string value which specifies the member’s name.

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

string

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 object

An 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

memberName string

A string value which specifies the member’s name.

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

memberName string

A string value which specifies the member name.

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

session Session
theObject object
isUpdate bool
addDelayedReference bool

Returns

MemberInfoCollection

GetRefTypes()

This member supports the .NET Framework infrastructure and cannot be used directly from your code.

public ICollection GetRefTypes()

Returns

ICollection

GetShortAssemblyName(Assembly)

Gets the short name of the specified assembly.

public static string GetShortAssemblyName(Assembly assembly)

Parameters

assembly Assembly

The assembly.

Returns

string

A string value that represents the specified assembly’s short name.

GetTableName()

protected virtual string GetTableName()

Returns

string

HasModifications(object)

Checks if there are modifications with the specified persistent object.

public abstract bool HasModifications(object theObject)

Parameters

theObject object

A 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 XPClassInfo

An 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

XPMemberInfo

ToString()

Returns a string that represents the full name of the class.

public override string ToString()

Returns

string

A string value which specifies the full name of the class.