Back to Devexpress

Session.GetClassInfo(String, String) Method

xpo-devexpress-dot-xpo-dot-session-dot-getclassinfo-x28-system-dot-string-system-dot-string-x29.md

latest4.4 KB
Original Source

Session.GetClassInfo(String, String) Method

Returns the XPClassInfo for the specified assembly and class.

Namespace : DevExpress.Xpo

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

A String value which specifies the assembly name.

| | className | String |

A String value which specifies the class name.

|

Returns

TypeDescription
XPClassInfo

An XPClassInfo object which provides metadata information for the specified assembly and class.

|

Remarks

The GetClassInfo method retrieves the metadata information via the Session.Dictionary. If the metadata cannot be obtained, a CannotResolveClassInfoException is thrown.

The following code snippets (auto-collected from DevExpress Examples) contain references 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/Program.cs#L89

csharp
InitDataDictionary(dataSession);
dataSession.UpdateSchema(dataSession.GetClassInfo(null, "Customer"), dataSession.GetClassInfo(null, "Order"));

asp-net-mvc-grid-custom-binding-and-xpo/CS/XPCustomBindingExample/XPO/StartupHelper.cs#L20

csharp
XPClassInfo classInfo = uow.GetClassInfo("", "Order");

XPO_how-to-generate-persistent-metadata-for-an-arbitrary-data-table-e2922/CS/MapArbitraryDatabaseExample/Form1.cs#L15

csharp
void BindCategories() {
    gridControl1.DataSource = new XPCollection(session1, session1.GetClassInfo(string.Empty, "Category"));
}

XPO_how-to-persist-metadata-e269/VB/Program.vb#L80

vb
InitDataDictionary(dataSession)
dataSession.UpdateSchema(dataSession.GetClassInfo(Nothing, "Customer"), dataSession.GetClassInfo(Nothing, "Order"))
Dim classCustomer As XPClassInfo = dataSession.GetClassInfo("", "Customer")

asp-net-mvc-grid-custom-binding-and-xpo/VB/XPCustomBindingExample/XPO/StartupHelper.vb#L24

vb
Dim classInfo As XPClassInfo = uow.GetClassInfo("", "Order")

See Also

Session Class

Session Members

DevExpress.Xpo Namespace