public override void Register(ContainerBuilder builder)
        {
            builder.RegisterInstance(new ShellSettings {
                Name = "Default"
            });

            _folders = new ExtensionManagerTests.StubFolders();
            _packagesInRepository = new StubPackagingSourceManager();
            _packageManager       = new StubPackageManager();
            builder.RegisterInstance(_folders).As <IExtensionFolders>();
            builder.RegisterType <RecipeExecutionLogger>().AsSelf();
            builder.RegisterType <ExtensionManager>().As <IExtensionManager>();
            builder.RegisterType <FeatureManager>().As <IFeatureManager>();
            builder.RegisterType <StubCacheManager>().As <ICacheManager>();
            builder.RegisterType <StubParallelCacheContext>().As <IParallelCacheContext>();
            builder.RegisterType <StubAsyncTokenProvider>().As <IAsyncTokenProvider>();
            builder.RegisterType <ShellDescriptorManager>().As <IShellDescriptorManager>().SingleInstance();
            builder.RegisterType <StubDataMigrationManager>().As <IDataMigrationManager>();
            builder.RegisterInstance(_packagesInRepository).As <IPackagingSourceManager>();
            builder.RegisterInstance(_packageManager).As <IPackageManager>();
            builder.RegisterType <ShellStateManager>().As <IShellStateManager>().SingleInstance();
            builder.RegisterType <StubEventBus>().As <IEventBus>().SingleInstance();
            builder.RegisterType <ModuleStep>();
            builder.RegisterSource(new EventsRegistrationSource());
        }
예제 #2
0
        public override void Register(ContainerBuilder builder) {
            builder.RegisterInstance(new ShellSettings { Name = "Default" });

            _folders = new ExtensionManagerTests.StubFolders();
            _packagesInRepository = new StubPackagingSourceManager();
            _packageManager = new StubPackageManager();
            builder.RegisterInstance(_folders).As<IExtensionFolders>();
            builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
            builder.RegisterType<FeatureManager>().As<IFeatureManager>();
            builder.RegisterType<StubCacheManager>().As<ICacheManager>();
            builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
            builder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
            builder.RegisterType<ShellDescriptorManager>().As<IShellDescriptorManager>().SingleInstance();
            builder.RegisterType<StubDataMigrationManager>().As<IDataMigrationManager>();
            builder.RegisterInstance(_packagesInRepository).As<IPackagingSourceManager>();
            builder.RegisterInstance(_packageManager).As<IPackageManager>();
            builder.RegisterType<ShellStateManager>().As<IShellStateManager>().SingleInstance();
            builder.RegisterType<StubEventBus>().As<IEventBus>().SingleInstance();
            builder.RegisterType<ModuleRecipeHandler>();
            builder.RegisterSource(new EventsRegistrationSource());
        }