예제 #1
0
 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>();
 }
예제 #2
0
        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>();
        }
예제 #3
0
 public void Exit()
 {
     _mainViewModel?.Dispose();
     _mainViewModel = null;
 }
예제 #4
0
 public void Exit()
 {
     _mainViewModel?.Dispose();
     _mainViewModel = null;
 }