public override void Register(ContainerBuilder builder)
        {
            var _testVirtualPathProvider = new StylesheetBindingStrategyTests.TestVirtualPathProvider();

            builder.RegisterInstance(new ShellSettings {
                Name = "Default"
            });

            _folders = new ExtensionManagerTests.StubFolders();
            _packagesInRepository = new ModuleRecipeHandlerTest.StubPackagingSourceManager();
            _packageManager       = new ModuleRecipeHandlerTest.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 <ModuleRecipeHandlerTest.StubDataMigrationManager>().As <IDataMigrationManager>();
            builder.RegisterInstance(_packagesInRepository).As <IPackagingSourceManager>();
            builder.RegisterInstance(_packageManager).As <IPackageManager>();
            builder.RegisterType <ShellStateManager>().As <IShellStateManager>().SingleInstance();
            builder.RegisterInstance(_testVirtualPathProvider).As <IVirtualPathProvider>();
            builder.RegisterType <StubEventBus>().As <IEventBus>().SingleInstance();
            builder.RegisterType <ThemeService>().As <IThemeService>();
            builder.RegisterType <StubOrchardServices>().As <IOrchardServices>();
            builder.RegisterType <StubSiteThemeService>().As <ISiteThemeService>();
            builder.RegisterType <ThemeRecipeHandler>();
            builder.RegisterSource(new EventsRegistrationSource());
        }
Ejemplo n.º 2
0
        public override void Register(ContainerBuilder builder) {
            var _testVirtualPathProvider = new StylesheetBindingStrategyTests.TestVirtualPathProvider();

            builder.RegisterInstance(new ShellSettings { Name = "Default" });

            _folders = new ExtensionManagerTests.StubFolders();
            _packagesInRepository = new ModuleRecipeHandlerTest.StubPackagingSourceManager();
            _packageManager = new ModuleRecipeHandlerTest.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<ModuleRecipeHandlerTest.StubDataMigrationManager>().As<IDataMigrationManager>();
            builder.RegisterInstance(_packagesInRepository).As<IPackagingSourceManager>();
            builder.RegisterInstance(_packageManager).As<IPackageManager>();
            builder.RegisterType<ShellStateManager>().As<IShellStateManager>().SingleInstance();
            builder.RegisterInstance(_testVirtualPathProvider).As<IVirtualPathProvider>();
            builder.RegisterType<StubEventBus>().As<IEventBus>().SingleInstance();
            builder.RegisterType<ThemeService>().As<IThemeService>();
            builder.RegisterType<StubOrchardServices>().As<IOrchardServices>();
            builder.RegisterType<StubSiteThemeService>().As<ISiteThemeService>();
            builder.RegisterType<ThemeRecipeHandler>();
            builder.RegisterSource(new EventsRegistrationSource());
        }