Table of Contents

Class XPTypeInfo

Namespace
DevExpress.Xpo.Metadata
Assembly
DevExpress.Xpo.v24.1.dll

Serves as a base for classes that discover the object’s attributes and provide access to its metadata.

public abstract class XPTypeInfo
Inheritance
XPTypeInfo
Derived
Inherited Members

Constructors

XPTypeInfo()

protected XPTypeInfo()

Properties

Attributes

Gets the attributes for this type.

public Attribute[] Attributes { get; }

Property Value

Attribute[]

An array of Attribute descendants.

CanPersist

protected abstract bool CanPersist { get; }

Property Value

bool

IsPersistent

Gets whether a class or member of this type is persistent.

public bool IsPersistent { get; }

Property Value

bool

true if a class or member of this type is persistent; otherwise, false.

IsVisibleInDesignTime

Gets whether a property or class is visible at design time.

public bool IsVisibleInDesignTime { get; }

Property Value

bool

true if the property or class is visible at design time; otherwise, false.

Methods

AddAttribute(Attribute)

Adds a new attribute to the attribute collection of the type.

public void AddAttribute(Attribute attribute)

Parameters

attribute Attribute

A Attribute descendant which represents the attribute for this type.

DropCache()

protected virtual void DropCache()

FindAttributeInfo(string)

Searches for an attribute with the specified name.

public Attribute FindAttributeInfo(string attributeName)

Parameters

attributeName string

A string value that specifies the name of the attribute to search for.

Returns

Attribute

A Attribute descendant with the specified name. null (Nothing in Visual Basic) if an attribute with the specified name isn’t found.

FindAttributeInfo(Type)

Searches for an attribute of the specified type.

public Attribute FindAttributeInfo(Type attributeType)

Parameters

attributeType Type

A Type descendant which represents the type of the attribute to search for.

Returns

Attribute

A Attribute descendant of the specified type. null (Nothing in Visual Basic) if an attribute of the specified type isn’t found.

GetAttributeInfo(string)

Returns the attribute with the specified name.

public Attribute GetAttributeInfo(string name)

Parameters

name string

A string value which specifies the name of the attribute to retrieve.

Returns

Attribute

A Attribute descendant with the specified name. null (Nothing in Visual Basic) if an attribute with the specified name isn’t found. In this case a RequiredAttributeMissingException exception is thrown.

GetAttributeInfo(Type)

Returns the attribute of the specified type.

public Attribute GetAttributeInfo(Type attributeType)

Parameters

attributeType Type

A Type descendant which represents the type of the attribute to retrieve.

Returns

Attribute

A Attribute descendant of the specified type. null (Nothing in Visual Basic) if an attribute of the specified type isn’t found. In this case the RequiredAttributeMissingException is thrown.

HasAttribute(string)

Determines whether the type has the specified attribute.

public bool HasAttribute(string name)

Parameters

name string

A string value which specifies the name of the attribute to find.

Returns

bool

true if the type has the specified attribute; otherwise, false.

HasAttribute(Type)

Determines whether the type has an attribute of the specified type.

public bool HasAttribute(Type attributeType)

Parameters

attributeType Type

A Type descendant which represents the type of the attribute to find.

Returns

bool

true if the type has an attribute of the specified type; otherwise, false.

RemoveAttribute(Type)

Removes the attribute of the specified type.

public void RemoveAttribute(Type attributeType)

Parameters

attributeType Type

A Type descendant which represents the type of the attribute to remove.