Example #1
0
        protected override void Configure()
        {
            _container = new CompositionContainer(
                new AggregateCatalog(
                    catalogs: AssemblySource.Instance
                    .Select(x => new AssemblyCatalog(x)).OfType <ComposablePartCatalog>()
                    )
                );

            var batch = new CompositionBatch();

            var windowManager = new AppWindowManager();

            windowManager.RegisterStateStore(Settings.Current);


            batch.AddExportedValue <IWindowManager>(windowManager);
            batch.AddExportedValue <IEventAggregator>(new EventAggregator());
            // batch.AddExportedValue<IInteractionResolver>()
            batch.AddExportedValue(_container);

            _container.Compose(batch);

            AddCustomConventions();
        }
        protected override void Configure()
        {
            var aggregateCatalog = new AggregateCatalog(
                catalogs: AssemblySource.Instance
                .Select(x => new AssemblyCatalog(x)).OfType <ComposablePartCatalog>()
                );

            aggregateCatalog.Catalogs.Add(LiteDbExplorerWpfCatalog.AssemblyCatalog);

            _container = new CompositionContainer(aggregateCatalog);

            var batch = new CompositionBatch();

            var windowManager = new AppWindowManager();

            windowManager.RegisterStateStore(Settings.Current);


            batch.AddExportedValue <IWindowManager>(windowManager);
            batch.AddExportedValue <IEventAggregator>(new EventAggregator());
            batch.AddExportedValue <IRecentFilesProvider>(new Paths());
            batch.AddExportedValue(NotificationInteraction.Manager);
            batch.AddExportedValue(_container);

            _container.Compose(batch);

            AddCustomConventions();

            AddCustomViewLocator();
        }