Ejemplo n.º 1
0
        static void Main()
        {
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();

            WindowsFormsSettings.LoadApplicationSettings();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            if (Tracing.GetFileLocationFromSettings() == FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            var winApplication = new TestWinApplication();

            winApplication.Modules.Add(new WinModule());

            winApplication.RegisterInMemoryObjectSpaceProvider();
            winApplication.AlwaysUpdateOnDatabaseVersionMismatch().Subscribe();
            try {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.HandleException(e);
            }
        }
Ejemplo n.º 2
0
        public void UnloadWinModules(Type moduleType)
        {
            ReactiveModuleBase.Unload(moduleType);
            using var application = new TestWinApplication(moduleType, false);
            application.AddModule((ModuleBase)moduleType.CreateInstance(), nameof(UnloadWinModules));

            application.Modules.FirstOrDefault(m => m.GetType() == moduleType).ShouldBeNull();
        }