Back to Devexpress

XPObjectSpaceProvider.CreateObjectSpace() Method

expressappframework-devexpress-dot-expressapp-dot-xpo-dot-xpobjectspaceprovider-7aee9e03.md

latest2.9 KB
Original Source

XPObjectSpaceProvider.CreateObjectSpace() Method

Instantiates an Object Space.

Namespace : DevExpress.ExpressApp.Xpo

Assembly : DevExpress.ExpressApp.Xpo.v25.2.dll

NuGet Package : DevExpress.ExpressApp.Xpo

Declaration

csharp
public IObjectSpace CreateObjectSpace()
vb
Public Function CreateObjectSpace As IObjectSpace

Returns

TypeDescription
IObjectSpace

An IObjectSpace object that is the instantiated Object Space.

|

Remarks

If you implement a custom SecuredObjectSpaceProvider with the CreateObjectSpace method overridden, make sure this method returns an object of the SecuredXPObjectSpace type instead of XPObjectSpace.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateObjectSpace() 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.

xaf-how-to-create-and-setup-an-xtrareport-report-for-exporting-to-a-stream-in-a-non-xaf/CS/XPO/ExportReport/ExportXAFReport/Program.cs#L21

csharp
using (XPObjectSpaceProvider objectSpaceProvider = CreateObjectSpaceProvider()) {
    IObjectSpace objectSpace = objectSpaceProvider.CreateObjectSpace();
    ReportDataV2 reportData = objectSpace.FindObject<ReportDataV2>(new BinaryOperator("DisplayName", "Employees Report"));

See Also

CreateObjectSpace

XPObjectSpaceProvider Class

XPObjectSpaceProvider Members

DevExpress.ExpressApp.Xpo Namespace