public SSBootstraper() { var aggregateCatalog = new AggregateCatalog(); string currentPath = Directory.GetCurrentDirectory(); aggregateCatalog.Catalogs.Add(new DirectoryCatalog(currentPath)); aggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(SSBootstraper).Assembly)); _container = new CompositionContainer(aggregateCatalog); var logger = new SSLogger(); var composition = new CompositionBatch(); composition.AddExportedValue(_container); composition.AddExportedValue(logger); _container.Compose(composition); _mainViewModel = _container.GetExportedValue<ISSMainViewModel>(); }
public SSBootstraper() { var aggregateCatalog = new AggregateCatalog(); string currentPath = Directory.GetCurrentDirectory(); aggregateCatalog.Catalogs.Add(new DirectoryCatalog(currentPath)); aggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(SSBootstraper).Assembly)); _container = new CompositionContainer(aggregateCatalog); var logger = new SSLogger(); var composition = new CompositionBatch(); composition.AddExportedValue(_container); composition.AddExportedValue(logger); _container.Compose(composition); _mainViewModel = _container.GetExportedValue <ISSMainViewModel>(); }
public void Exit() { _mainViewModel?.Dispose(); _mainViewModel = null; }
public void Exit() { _mainViewModel?.Dispose(); _mainViewModel = null; }