Back to Devexpress

XPDictionary.GetClassInfo(String, String) Method

xpo-devexpress-dot-xpo-dot-metadata-dot-xpdictionary-dot-getclassinfo-x28-system-dot-string-system-dot-string-x29.md

latest3.3 KB
Original Source

XPDictionary.GetClassInfo(String, String) Method

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

Namespace : DevExpress.Xpo.Metadata

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public XPClassInfo GetClassInfo(
    string assemblyName,
    string className
)
vb
Public Function GetClassInfo(
    assemblyName As String,
    className As String
) As XPClassInfo

Parameters

NameTypeDescription
assemblyNameString

The assembly name.

| | className | String |

The full name of the class.

|

Returns

TypeDescription
XPClassInfo

The XPClassInfo for the specified class.

|

Remarks

This method throws the CannotResolveClassInfoException whenever the metadata information cannot be obtained for the specified class; for example, if the class does not implement IXPSimpleObject an exception is thrown.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetClassInfo(String, String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XPO_how-to-persist-metadata-e269/CS/MetadataObjects.cs#L65

csharp
void CreateMembers(XPDictionary dictionary) {
    XPClassInfo ci = dictionary.GetClassInfo(AssemblyName, Name);
    foreach(PersistentMemberInfo mi in OwnMembers) {

XPO_how-to-persist-metadata-e269/VB/MetadataObjects.vb#L91

vb
Private Sub CreateMembers(ByVal dictionary As XPDictionary)
    Dim ci As XPClassInfo = dictionary.GetClassInfo(AssemblyName, Name)
    For Each mi As PersistentMemberInfo In OwnMembers

See Also

GetClassInfo

QueryClassInfo

XPDictionary Class

XPDictionary Members

DevExpress.Xpo.Metadata Namespace