.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

XafApplication.Setup(String, IList<IObjectSpaceProvider>, String[], ISecurityStrategyBase) Method

Initializes the newly created XafApplication class instance.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public void Setup(
    string applicationName,
    IList<IObjectSpaceProvider> objectSpaceProviders,
    string[] moduleAssemblies,
    ISecurityStrategyBase security
)
Public Sub Setup(
    applicationName As String,
    objectSpaceProviders As IList(Of IObjectSpaceProvider),
    moduleAssemblies As String(),
    security As ISecurityStrategyBase
)
public void Setup(
    string applicationName,
    IList<IObjectSpaceProvider> objectSpaceProviders,
    string[] moduleAssemblies,
    ISecurityStrategyBase security
)
Public Sub Setup(
    applicationName As String,
    objectSpaceProviders As IList(Of IObjectSpaceProvider),
    moduleAssemblies As String(),
    security As ISecurityStrategyBase
)
public void Setup(
    string applicationName,
    IList<IObjectSpaceProvider> objectSpaceProviders,
    string[] moduleAssemblies,
    ISecurityStrategyBase security
)
Public Sub Setup(
    applicationName As String,
    objectSpaceProviders As IList(Of IObjectSpaceProvider),
    moduleAssemblies As String(),
    security As ISecurityStrategyBase
)

Parameters

Name Type Description
applicationName String

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

objectSpaceProviders IList<IObjectSpaceProvider>

An IList<IObjectSpaceProvider> list used to initialize the XafApplication.ObjectSpaceProviders property and then used to create Object Spaces (see BaseObjectSpace).

moduleAssemblies String[]

An array of string values that are the names of modules to be used in the application. These modules are added to the module list of the application's Modules Manager.

security DevExpress.ExpressApp.Security.ISecurityStrategyBase

The ISecurityStrategyBase object that is the Security Strategy that will be used in the application.

Parameters

Name Type Description
applicationName String

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

objectSpaceProviders IList<IObjectSpaceProvider>

An IList<IObjectSpaceProvider> list used to initialize the XafApplication.ObjectSpaceProviders property and then used to create Object Spaces (see BaseObjectSpace).

moduleAssemblies String[]

An array of string values that are the names of modules to be used in the application. These modules are added to the module list of the application's Modules Manager.

security DevExpress.ExpressApp.Security.ISecurityStrategyBase

The ISecurityStrategyBase object that is the Security Strategy that will be used in the application.

Parameters

Name Type Description
applicationName String

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

objectSpaceProviders IList<IObjectSpaceProvider>

An IList<IObjectSpaceProvider> list used to initialize the XafApplication.ObjectSpaceProviders property and then used to create Object Spaces (see BaseObjectSpace).

moduleAssemblies String[]

An array of string values that are the names of modules to be used in the application. These modules are added to the module list of the application's Modules Manager.

security DevExpress.ExpressApp.Security.ISecurityStrategyBase

The ISecurityStrategyBase object that is the Security Strategy that will be used in the application.

Remarks

The Setup() method overload is automatically called in the Main or Session_Start method after creating the WinApplication or WebApplication object. Leave this method to initialize the application's settings with the default values and the values set via the Application Designer. To set custom values for the XafApplication.ApplicationName, XafApplication.Security and XafApplication.ConnectionString properties and add additional modules to the XafApplication.Modules list, call this method overload instead. If you do not need to override the default values of one of the properties, pass Sting.Empty 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