A newer version of this page is available. Switch to the current version.

ModuleBase.CustomizeLogics(CustomLogics) Method

Allows you to override domain logic classes registered for Application Model interfaces.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll


public virtual void CustomizeLogics(
    CustomLogics customLogics


Name Type Description
customLogics CustomLogics

A CustomLogics object exposing methods to manage domain logic classes registered for Application Model interfaces.


This method allows you to replace the default domain logic implementations used for the Application Model interfaces with custom ones. For this purpose, a CustomLogics object exposed by the customLogics parameter supplies the CustomLogics.RegisterLogic and CustomLogics.UnregisterLogic methods. The following code snippet illustrates their use. The IModelDetailView interface’s ModelDetailViewDomainLogic is replaced by a custom MyLogic domain logic class. The custom logic class changes the default value of the IModelView.AllowEdit property for all the Detail Views to false.

using DevExpress.ExpressApp.DC;
using DevExpress.ExpressApp.DC.Xpo;
using DevExpress.ExpressApp.Model;
using DevExpress.ExpressApp.Model.DomainLogics;
public sealed partial class MyModule : ModuleBase {
    public override void CustomizeLogics(CustomLogics customLogics) {
        customLogics.UnregisterLogic(typeof(IModelDetailView), typeof(ModelDetailViewDomainLogic));
        customLogics.RegisterLogic(typeof(IModelDetailView), typeof(MyLogic));        
public static class MyLogic {
    public static bool Get_AllowEdit(IModelDetailView modelView) {
        return false;
See Also