Esempio n. 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            AppLogger.Info("Logger attached");

            ThemeManager.EnableDefaultThemeLoading      = false;
            ThemeManager.EnableDPICorrection            = true;
            ApplicationThemeHelper.ApplicationThemeName = ThemeConstants.DevExpressThemeName;

            AppDomain.CurrentDomain.UnhandledException += this.CurrentDomainOnUnhandledException;
            //AppDomain.CurrentDomain.FirstChanceException += this.CurrentDomainOnFirstChanceException;

            DispatcherUnhandledException          += this.HandleDispatcherException;
            TaskScheduler.UnobservedTaskException += this.HandleUnobservedTaskException;

            var serviceContainer = ServiceContainerBuilder.CreateDependencyInjectionContainer();

            this._currentApplication = new ApplicationRuntime(Current, serviceContainer);

            this._bootstrapper = new Bootstrapper(this._currentApplication, serviceContainer);
            this._bootstrapper.Run();

            var shellController = this.CreateShellController(serviceContainer);
            var shell           = new Shell(shellController.ViewModel);

            this._currentApplication.AttachShell(shellController, shell);
            this._currentApplication.ShowUi();
        }
 public TestInfrastructure()
 {
     this.TestData    = new TestData();
     this.DiContainer = ServiceContainerBuilder.CreateDependencyInjectionContainer();
 }
Esempio n. 3
0
 public Bootstrapper(IApplicationRuntime application) : this(application,
                                                             ServiceContainerBuilder.CreateDependencyInjectionContainer())
 {
 }