XafApplication.Setup(String, IObjectSpaceProvider) Method

Initializes the newly created XafApplication class instance.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public void Setup(
    string applicationName,
    IObjectSpaceProvider objectSpaceProvider
)
Public Sub Setup(
    applicationName As String,
    objectSpaceProvider As IObjectSpaceProvider
)

Parameters

Type Name Description
String applicationName

A string value that represents the application's name. This value is assigned to the XafApplication.ApplicationName property.

IObjectSpaceProvider objectSpaceProvider

An object that implements the IObjectSpaceProvider interface. This object is assigned to the XafApplication.ObjectSpaceProvider property and then used to create an Object Space (see BaseObjectSpace).

Remarks

The Setup() method overload is automatically called in the Main (Session_Start) method after creating the WinApplication or WebApplication object. Leave this method call to initialize the application's settings by default values and the vaules set via the Application Designer. To set custom values for the XafApplication.ApplicationName and/or XafApplication.ObjectSpaceProvider properties, call this method overload instead. If you do not need to override the default value of the XafApplication.ApplicationName and/or XafApplication.ObjectSpaceProvider property, pass "" or null (Nothing in VB).

To create an Object Space Provider, use a custom DataLayer or connection string. To get the connection string use the XafApplication.ConnectionString property.

See Also