/// <summary> /// Initializes a new instance of the <see cref="AppBootstrapper" /> class. /// </summary> public AppBootstrapper() { _kernel = new StandardKernel(); _catalog = new AppCatalog(AppDomain.CurrentDomain, AppCatalog.GetProduct(GetType().Assembly)); Initialize(); }
/// <summary> /// Releases unmanaged and managed resources. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected virtual void Dispose(bool disposing) { if (_isDisposed) { return; } if (disposing) { if (_kernel != null) { _kernel.Dispose(); _kernel = null; } _catalog = null; } _isDisposed = true; }
/// <summary> /// Configure the container. /// </summary> protected override void Configure() { base.Configure(); if (!Execute.InDesignMode) { KernelConfigurator.Configure(_kernel, _catalog.Modules); #pragma warning disable S2696 LogManager.GetLog = type => _kernel.Get <IUILogService>(new ConstructorArgument("type", type)); #pragma warning restore S2696 } ViewLocator.AddNamespaceMapping("*", "Logikfabrik.Overseer.WPF.Client.Views"); _catalog = null; LanguageConfigurator.Configure(_kernel.Get <IAppSettingsFactory>()); DataBindingLanguageConfigurator.Configure(); DataBindingActionConfigurator.Configure(); ConventionConfigurator.Configure(); ErrorLogHandlerConfigurator.Configure(_kernel.Get <AppDomain>(), _kernel.Get <IApp>(), _kernel.Get <ILogService>()); BuildNotificationConfigurator.Configure(_kernel.Get <IBuildTracker>(), _kernel.Get <IBuildNotificationManager>()); }