public static void RegisterDefaults(this XafApplication application, params ModuleBase[] modules) { if (modules.Any() && application.Security is SecurityStrategyComplex) { modules = modules.Add(new TestApplicationModule()).ToArray(); } application.AlwaysUpdateOnDatabaseVersionMismatch().Subscribe(); var moduleBases = new[] { new SystemModule(), application is WinApplication ? (ModuleBase) new SystemWindowsFormsModule() : new SystemAspNetModule() }.Concat(modules.Concat(new [] { new ReactiveLoggerModule() })); if (((ITestApplication)application).TransmitMessage) { if (Process.GetProcessesByName("Xpand.XAF.Modules.Reactive.Logger.Client.Win").Any()) { moduleBases = moduleBases.Add(new ReactiveLoggerHubModule()); } } foreach (var moduleBase in moduleBases) { if (application.Modules.All(_ => moduleBase.GetType() != _.GetType())) { application.Modules.Add(moduleBase); } } application.AddObjectSpaceProvider(); }
public static void RegisterDefaults(this XafApplication application, params ModuleBase[] modules) { application.AlwaysUpdateOnDatabaseVersionMismatch().Subscribe(); application.Modules.Add((ReactiveModule)typeof(ReactiveModule).CreateInstance()); application.Modules.AddRange(modules); application.RegisterInMemoryObjectSpaceProvider(); }
public static void RegisterDefaults(this XafApplication application, params ModuleBase[] modules) { application.AlwaysUpdateOnDatabaseVersionMismatch().Subscribe(); application.Modules.AddRange(modules); application.RegisterInMemoryObjectSpaceProvider(); MockFrameTemplate(application); }
public static void RegisterDefaults(this XafApplication application, params ModuleBase[] modules) { if (modules.Any() && application.Security is SecurityStrategyComplex) { if (!modules.OfType <TestApplicationModule>().Any()) { modules = modules.Add(new TestApplicationModule()).ToArray(); } } application.AlwaysUpdateOnDatabaseVersionMismatch().Subscribe(); object instance; var platform = application.GetPlatform(); if (platform == Platform.Win) { instance = (ModuleBase)AppDomain.CurrentDomain .GetAssemblyType("DevExpress.ExpressApp.Win.SystemModule.SystemWindowsFormsModule") .CreateInstance(); } else if (platform == Platform.Web) { instance = AppDomain.CurrentDomain .GetAssemblyType("DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule") .CreateInstance(); } else { instance = AppDomain.CurrentDomain .GetAssemblyType("DevExpress.ExpressApp.Blazor.SystemModule.SystemBlazorModule") .CreateInstance(); } var moduleBases = new[] { new SystemModule(), instance } .Concat(modules) .Concat(new [] { new ReactiveLoggerModule() }) ; if (((ITestApplication)application).TransmitMessage) { if (Process.GetProcessesByName("Xpand.XAF.Modules.Reactive.Logger.Client.Win").Any()) { moduleBases = moduleBases.Add(new ReactiveLoggerHubModule()); } } foreach (var moduleBase in moduleBases) { if (application.Modules.All(_ => moduleBase.GetType() != _.GetType())) { application.Modules.AddRange(new [] { moduleBase }); } } application.AddObjectSpaceProvider(); }
public static void RegisterDefaults(this XafApplication application, params ModuleBase[] modules) { application.AlwaysUpdateOnDatabaseVersionMismatch().Subscribe(); var moduleBases = new[] { new SystemModule(), application is WinApplication ? (ModuleBase) new SystemWindowsFormsModule() : new SystemAspNetModule() }.Concat(modules); foreach (var moduleBase in moduleBases) { if (application.Modules.FindModule(moduleBase.GetType()) == null) { application.Modules.Add(moduleBase); } } application.RegisterInMemoryObjectSpaceProvider(); }
public static void RegisterDefaults(this XafApplication application, params ModuleBase[] modules) { if (modules.Any() && application.Security is SecurityStrategyComplex) { modules = modules.Add(new ModuleUpdaterModule()).ToArray(); } application.AlwaysUpdateOnDatabaseVersionMismatch().Subscribe(); var moduleBases = new[] { new ReactiveLoggerHubModule(), new SystemModule(), application is WinApplication ? (ModuleBase) new SystemWindowsFormsModule() : new SystemAspNetModule() }.Concat(modules); foreach (var moduleBase in moduleBases) { if (application.Modules.All(_ => moduleBase.GetType() != _.GetType())) { application.Modules.Add(moduleBase); } } application.RegisterInMemoryObjectSpaceProvider(); }