public PageTypeSynchronizer(IPageTypeDefinitionLocator pageTypeDefinitionLocator, 
     PageTypeBuilderConfiguration configuration, 
     PageTypePropertyUpdater pageTypePropertyUpdater,
     PageTypeDefinitionValidator pageTypeDefinitionValidator,
     PageTypeResolver pageTypeResolver,
     IPageTypeLocator pageTypeLocator,
     PageTypeUpdater pageTypeUpdater,
     TabDefinitionUpdater tabDefinitionUpdater,
     TabLocator tabLocator)
 {
     _configuration = configuration;
     PageTypeResolver = pageTypeResolver;
     TabLocator = tabLocator;
     TabDefinitionUpdater = tabDefinitionUpdater;
     _pageTypeDefinitions = pageTypeDefinitionLocator.GetPageTypeDefinitions();
     PageTypeUpdater = pageTypeUpdater;
     PageTypePropertyUpdater = pageTypePropertyUpdater;
     PageTypeDefinitionValidator = pageTypeDefinitionValidator;
     _pageTypeLocator = pageTypeLocator;
 }
예제 #2
0
        public void Initialize(InitializationEngine context)
        {
            var assemblyLocator = new AppDomainAssemblyLocator();
            var pageTypeLocator = new PageTypeLocator(new PageTypeFactory());
            var pageTypeDefinitionLocator = new PageTypeDefinitionLocator(
                assemblyLocator);
            var pageTypeUpdater = new PageTypeUpdater(
                pageTypeDefinitionLocator,
                new PageTypeFactory(), 
                new PageTypeValueExtractor(),
                pageTypeLocator);
            var globalPropertySettingsLocator = new GlobalPropertySettingsLocator(assemblyLocator);
            var propertySettingsRepository = new PropertySettingsRepository();
            var pageTypePropertyUpdater = new PageTypePropertyUpdater(
                new PageDefinitionFactory(),
                new PageDefinitionTypeFactory(), 
                new TabFactory(),
                propertySettingsRepository,
                globalPropertySettingsLocator);

            var tabDefinitionUpdater = new TabDefinitionUpdater(new TabFactory());

            var tabLocator = new TabLocator(assemblyLocator);

            PageTypeSynchronizer synchronizer = new PageTypeSynchronizer(
                pageTypeDefinitionLocator, 
                Configuration,
                pageTypePropertyUpdater,
                new PageTypeDefinitionValidator(new PageDefinitionTypeMapper(new PageDefinitionTypeFactory())), 
                PageTypeResolver.Instance,
                pageTypeLocator,
                pageTypeUpdater,
                tabDefinitionUpdater,
                tabLocator,
                new GlobalPropertySettingsSynchronizer(propertySettingsRepository, globalPropertySettingsLocator));
            synchronizer.SynchronizePageTypes();

            DataFactory.Instance.LoadedPage += DataFactory_LoadedPage;
            DataFactory.Instance.LoadedChildren += DataFactory_LoadedChildren;
            DataFactory.Instance.LoadedDefaultPageData += DataFactory_LoadedPage;
        }
 public PageTypeSynchronizer(IPageTypeDefinitionLocator pageTypeDefinitionLocator, 
     PageTypeBuilderConfiguration configuration, 
     PageDefinitionSynchronizationEngine pageDefinitionSynchronizationEngine,
     PageTypeDefinitionValidator pageTypeDefinitionValidator,
     PageTypeResolver pageTypeResolver,
     IPageTypeLocator pageTypeLocator,
     PageTypeUpdater pageTypeUpdater,
     TabDefinitionUpdater tabDefinitionUpdater,
     TabLocator tabLocator,
     GlobalPropertySettingsSynchronizer globalPropertySettingsSynchronizer,
     IHooksHandler hooksHandler)
 {
     _configuration = configuration;
     this.pageTypeResolver = pageTypeResolver;
     TabLocator = tabLocator;
     TabDefinitionUpdater = tabDefinitionUpdater;
     _pageTypeDefinitions = pageTypeDefinitionLocator.GetPageTypeDefinitions();
     PageTypeUpdater = pageTypeUpdater;
     PageDefinitionSynchronizationEngine = pageDefinitionSynchronizationEngine;
     PageTypeDefinitionValidator = pageTypeDefinitionValidator;
     _pageTypeLocator = pageTypeLocator;
     this.globalPropertySettingsSynchronizer = globalPropertySettingsSynchronizer;
     this.hooksHandler = hooksHandler;
 }