Table of Contents

Class XPDictionary

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

Provides the abstract (MustInherit in Visual Basic) base class for metadata providers.

public abstract class XPDictionary : IXPDictionaryProvider
Inheritance
XPDictionary
Implements
Derived
Inherited Members

Constructors

XPDictionary()

protected XPDictionary()

Properties

Classes

When implemented by a class, gets a collection of the XPClassInfo objects that are supplied by the current metadata provider.

public abstract ICollection Classes { get; }

Property Value

ICollection

A collection of the XPClassInfo objects.

CustomAggregates

Gets a collection of custom aggregate function supplied by the current metadata provider.

public CustomAggregateCollection CustomAggregates { get; }

Property Value

CustomAggregateCollection

A collection of custom aggregate functions.

CustomFunctionOperators

Gets a collection of custom function operators supplied by the current metadata provider.

public CustomFunctionCollection CustomFunctionOperators { get; }

Property Value

CustomFunctionCollection

A DevExpress.Data.Filtering.CustomFunctionCollection object containing custom function operators supplied by the current metadata provider.

NullableBehavior

Specifies if nullable columns should be created when updating the database schema.

public NullableBehavior NullableBehavior { get; set; }

Property Value

NullableBehavior

A NullableBehavior enumeration value specifying if a nullable column should be created when updating the database schema.

UseStrictMetadataValidation

protected virtual bool UseStrictMetadataValidation { get; }

Property Value

bool

Methods

AddClassInfo(XPClassInfo)

Adds persistent class metadata information to the current metadata provider.

public void AddClassInfo(XPClassInfo info)

Parameters

info XPClassInfo

Persistent class metadata information of the objects to add to the XPDictionary.Classes collection of the objects that are supplied by the current metadata provider.

AddClassInfoCore(XPClassInfo)

protected abstract void AddClassInfoCore(XPClassInfo info)

Parameters

info XPClassInfo

CanAssemblyContainPersistentClasses(Assembly)

protected virtual bool CanAssemblyContainPersistentClasses(Assembly assembly)

Parameters

assembly Assembly

Returns

bool

CollectClassInfos(bool, IEnumerable<Assembly>)

public XPClassInfo[] CollectClassInfos(bool addNonPersistent, IEnumerable<Assembly> assemblies)

Parameters

addNonPersistent bool
assemblies IEnumerable<Assembly>

Returns

XPClassInfo[]

CollectClassInfos(bool, params Assembly[])

Obtains the metadata information for all the persistent objects that are defined in the specified assemblies.

public XPClassInfo[] CollectClassInfos(bool addNonPersistent, params Assembly[] assemblies)

Parameters

addNonPersistent bool

true to add metadata information for nonpersistent objects; otherwise, false.

assemblies Assembly[]

An array of assemblies which contain the persistent objects whose metadata information is collected.

Returns

XPClassInfo[]

An array of XPClassInfo for the persistent objects that are defined in the specified assemblies.

CollectClassInfos(IEnumerable<Assembly>)

public XPClassInfo[] CollectClassInfos(IEnumerable<Assembly> assemblies)

Parameters

assemblies IEnumerable<Assembly>

Returns

XPClassInfo[]

CollectClassInfos(IEnumerable<Type>)

public XPClassInfo[] CollectClassInfos(IEnumerable<Type> types)

Parameters

types IEnumerable<Type>

Returns

XPClassInfo[]

CollectClassInfos(params Assembly[])

Obtains the metadata information for all the persistent objects that are defined in the specified assemblies.

public XPClassInfo[] CollectClassInfos(params Assembly[] assemblies)

Parameters

assemblies Assembly[]

An array of assemblies which contain the persistent objects whose metadata information is collected.

Returns

XPClassInfo[]

An array of the XPClassInfos for the persistent objects that are defined in the assemblies within the assemblies array.

CollectClassInfos(params Type[])

Obtains the metadata information for all the persistent objects of the specified class types.

public XPClassInfo[] CollectClassInfos(params Type[] types)

Parameters

types Type[]

An array of the class types which correspond to the persistent objects whose metadata information is collected.

Returns

XPClassInfo[]

An array of the XPClassInfos for the persistent objects of the class types that are specified by the types array.

CreateClass(XPClassInfo, string, params Attribute[])

Creates a class with the specified name and attributes.

public XPClassInfo CreateClass(XPClassInfo baseClassInfo, string className, params Attribute[] attributes)

Parameters

baseClassInfo XPClassInfo

An XPClassInfo object which provides the metadata information of the base class.

className string

A string value that specifies the class name.

attributes Attribute[]

An array of attributes.

Returns

XPClassInfo

The XPClassInfo for the created class.

CreateClass(string, params Attribute[])

Creates a class with the specified name and attributes.

public XPClassInfo CreateClass(string className, params Attribute[] attributes)

Parameters

className string

A string value that specifies the class name.

attributes Attribute[]

An array of attributes.

Returns

XPClassInfo

The XPClassInfo for the created class.

DropDescendantsCache(XPClassInfo)

protected virtual void DropDescendantsCache(XPClassInfo changedClassInfo)

Parameters

changedClassInfo XPClassInfo

GetClassInfo(object)

Returns the persistent class metadata information for the specified object.

public XPClassInfo GetClassInfo(object theObject)

Parameters

theObject object

The object whose metadata information is obtained.

Returns

XPClassInfo

The XPClassInfo for the specified object.

GetClassInfo(string, string)

Returns the persistent class metadata information for the specified assembly name and class name.

public XPClassInfo GetClassInfo(string assemblyName, string className)

Parameters

assemblyName string

The assembly name.

className string

The full name of the class.

Returns

XPClassInfo

The XPClassInfo for the specified class.

GetClassInfo(Type)

Returns the persistent class metadata information for the specified class type.

public XPClassInfo GetClassInfo(Type classType)

Parameters

classType Type

The class type.

Returns

XPClassInfo

The XPClassInfo for the specified class type.

GetConverter(Type)

Gets the value-and-type convertor for the specified member type.

public ValueConverter GetConverter(Type memberType)

Parameters

memberType Type

A Type descendant which represents the type of the member.

Returns

ValueConverter

A ValueConverter descendant which represents the value-and-type convertor for the member whose type is passed as the memberType parameter or null reference (Nothing in Visual Basic) when the convertor is not specified (registered) for this member.

GetDataStoreSchema(params XPClassInfo[])

Gets the complete schema of a data store that corresponds to the specified persistent class metadata information.

public DBTable[] GetDataStoreSchema(params XPClassInfo[] types)

Parameters

types XPClassInfo[]

An array of the XPClassInfo objects.

Returns

DBTable[]

An array of data tables of the DevExpress.Xpo.DB.DBTable type that correspond to the metadata information which is passed as the types parameter.

GetDataStoreSchema(IEnumerable<XPClassInfo>)

public DBTable[] GetDataStoreSchema(IEnumerable<XPClassInfo> types)

Parameters

types IEnumerable<XPClassInfo>

Returns

DBTable[]

GetDataStoreSchema(IEnumerable<Assembly>)

public DBTable[] GetDataStoreSchema(IEnumerable<Assembly> assemblies)

Parameters

assemblies IEnumerable<Assembly>

Returns

DBTable[]

GetDataStoreSchema(IEnumerable<Type>)

public DBTable[] GetDataStoreSchema(IEnumerable<Type> types)

Parameters

types IEnumerable<Type>

Returns

DBTable[]

GetDataStoreSchema(params Assembly[])

Gets the complete schema of a data store that corresponds to the persistent objects which are defined within the specified assemblies.

public DBTable[] GetDataStoreSchema(params Assembly[] assemblies)

Parameters

assemblies Assembly[]

An array of assemblies which contain the persistent objects.

Returns

DBTable[]

An array of data tables of the DevExpress.Xpo.DB.DBTable type that correspond to the persistent objects which are defined in the assemblies within the assemblies array.

GetDataStoreSchema(params Type[])

Gets the complete schema of a data store that corresponds to the persistent objects of the specified class types.

public DBTable[] GetDataStoreSchema(params Type[] types)

Parameters

types Type[]

An array of class types which correspond to the persistent objects.

Returns

DBTable[]

An array of data tables of the DevExpress.Xpo.DB.DBTable type which correspond to the persistent objects of the class types that are specified by the types array.

GetId(object)

Gets the value of the specified object’s 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 obj‘s key property.

HasDescendants(XPClassInfo)

public bool HasDescendants(XPClassInfo classInfo)

Parameters

classInfo XPClassInfo

Returns

bool

HasDescendantsCore(XPClassInfo)

protected virtual bool HasDescendantsCore(XPClassInfo classInfo)

Parameters

classInfo XPClassInfo

Returns

bool

LoadXmlMetadata(TextReader)

Loads metadata with the specified TextReader.

[Obsolete("We do not recommend that you use this method due to potential vulnerabilities if the input XML document contains names of untrusted assemblies and types. Validate or sanitize the input XML documents even in testing and non-production environments for the best security.", false)]
public void LoadXmlMetadata(TextReader txtReader)

Parameters

txtReader TextReader

An instance of the TextReader containing XML data to read.

LoadXmlMetadata(string)

Loads metadata stored in a file in XML format.

[Obsolete("We do not recommend that you use this method due to potential vulnerabilities if the input XML document contains names of untrusted assemblies and types. Validate or sanitize the input XML documents even in testing and non-production environments for the best security.", false)]
public void LoadXmlMetadata(string filename)

Parameters

filename string

The path to a file containing XML data.

LoadXmlMetadata(XmlReader)

Loads metadata with the specified XmlTextReader.

[Obsolete("We do not recommend that you use this method due to potential vulnerabilities if the input XML document contains names of untrusted assemblies and types. Validate or sanitize the input XML documents even in testing and non-production environments for the best security.", false)]
public void LoadXmlMetadata(XmlReader reader)

Parameters

reader XmlReader

An instance of the XmlTextReader containing XML data to read.

QueryClassInfo(object)

When implemented by a class, returns the persistent class metadata information for the specified persistent object.

public XPClassInfo QueryClassInfo(object theObject)

Parameters

theObject object

The persistent object.

Returns

XPClassInfo

The XPClassInfo object for the specified object or null reference (Nothing in Visual Basic) when the metadata information cannot be obtained.

QueryClassInfo(string, string)

When implemented by a class, returns the persistent class metadata information for the specified assembly name and class name.

public abstract XPClassInfo QueryClassInfo(string assemblyName, string className)

Parameters

assemblyName string

The assembly name.

className string

The full name of the class.

Returns

XPClassInfo

The XPClassInfo object for the specified class or null reference (Nothing in Visual Basic) when the metadata information cannot be obtained.

QueryClassInfo(Type)

When implemented by a class, returns the persistent class metadata information for the specified class type.

public abstract XPClassInfo QueryClassInfo(Type classType)

Parameters

classType Type

The class type.

Returns

XPClassInfo

The XPClassInfo object for the specified class type or null reference (Nothing in Visual Basic) when the metadata information for the corresponding class cannot be obtained.

RegisterValueConverter(ValueConverter, Type)

Registers a value-and-type convertor for the specified member type.

public void RegisterValueConverter(ValueConverter converter, Type memberType)

Parameters

converter ValueConverter

A ValueConverter descendant which represents the value-and-type convertor for the member whose type is passed as the memberType parameter.

memberType Type

A Type descendant which represents the type of the member.

ToString()

Returns a string which represents the current object.

public override string ToString()

Returns

string

A string value which represents the current XPDictionary object.

Events

ClassInfoChanged

Fires when the metadata information of the objects that are supplied by the current metadata provider has been changed.

public event ClassInfoEventHandler ClassInfoChanged

Event Type

ClassInfoEventHandler