expressappframework-devexpress-dot-expressapp-dot-xafapplication-de599e36.md
Occurs when the application accesses the database.
Namespace : DevExpress.ExpressApp
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
public event EventHandler<CustomCheckCompatibilityEventArgs> CustomCheckCompatibility
Public Event CustomCheckCompatibility As EventHandler(Of CustomCheckCompatibilityEventArgs)
The CustomCheckCompatibility event's data class is CustomCheckCompatibilityEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| ApplicationName | Specifies the application’s name. Use this parameter to compare the actual application name with the application name in the database. |
| Handled | Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs. |
| IsCompatibilityChecked |
Indicates whether a compatibility has already been checked.
The CustomCheckCompatibility event is raised many times when logging on to the application and when creating each Object Space. Use the IsCompatibilityChecked property to perform database checking on the first compatibility check only.
| | Modules | List the application’s Modules. Use this parameter to compare the actual module versions with the module versions in the database. | | ObjectSpaceProvider |
Specifies the Object Space Provider for compatibility checking. Use this parameter to create a Session or an Object Space to work with the database.
Note that XAF uses the first registered Object Space Provider to pass it as the ObjectSpaceProvider argument. Ensure that NonPersistentObjectSpaceProvider is not the first registered Provider in your application.
|
When the application accesses the database, XAF checks the database and application compatibility. Handle the CustomCheckCompatibility event to perform a custom check of the application and database compatibility, update the database, or perform other actions.
Set the Handled parameter to true, to cancel the default actions.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomCheckCompatibility event.
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.
base.Setup(application);
application.CustomCheckCompatibility += new EventHandler<CustomCheckCompatibilityEventArgs>(application_CustomCheckCompatibility);
application.CreateCustomObjectSpaceProvider += new EventHandler<CreateCustomObjectSpaceProviderEventArgs>(application_CreateCustomObjectSpaceProvider);
MyBase.Setup(application)
AddHandler application.CustomCheckCompatibility, AddressOf application_CustomCheckCompatibility
AddHandler application.CreateCustomObjectSpaceProvider, AddressOf application_CreateCustomObjectSpaceProvider
See Also