示例#1
0
        internal static IComponentFactory GetComponentFactory(Localization localization)
        {
            lock (_componentFactories)
            {
                IComponentFactory componentFactory;
                if (!_componentFactories.TryGetValue(localization.LocalizationId, out componentFactory))
                {
                    IPublicationResolver   publicationResolver   = new PublicationResolver(localization);
                    IFactoryCommonServices factoryCommonServices = new FactoryCommonServices(publicationResolver, _logger, _config, CreateCacheAgent());
                    componentFactory = new ComponentFactory(
                        GetComponentPresentationFactory(localization),
                        factoryCommonServices);
                    _componentFactories.Add(localization.LocalizationId, componentFactory);
                }

                return(componentFactory);
            }
        }
        internal static IComponentFactory GetComponentFactory(Localization localization)
        {
            lock (_componentFactories)
            {
                IComponentFactory componentFactory;
                if (!_componentFactories.TryGetValue(localization.LocalizationId, out componentFactory))
                {
                    IPublicationResolver publicationResolver = new PublicationResolver(localization);
                    IFactoryCommonServices factoryCommonServices = new FactoryCommonServices(publicationResolver, _logger, _config, CreateCacheAgent());
                    componentFactory = new ComponentFactory(
                        GetComponentPresentationFactory(localization),
                        factoryCommonServices );
                    _componentFactories.Add(localization.LocalizationId, componentFactory);
                }

                return componentFactory;
            }
        }
示例#3
0
        internal static IBinaryFactory GetBinaryFactory(Localization localization)
        {
            lock (_binaryFactories)
            {
                IBinaryFactory binaryFactory;
                if (!_binaryFactories.TryGetValue(localization.LocalizationId, out binaryFactory))
                {
                    IPublicationResolver     publicationResolver     = new PublicationResolver(localization);
                    IProvidersCommonServices providersCommonServices = new ProvidersCommonServices(publicationResolver, _logger, _config);
                    IFactoryCommonServices   factoryCommonServices   = new FactoryCommonServices(publicationResolver, _logger, _config, CreateCacheAgent());
                    binaryFactory = new BinaryFactory(
                        new TridionBinaryProvider(providersCommonServices),
                        factoryCommonServices);
                    _binaryFactories.Add(localization.LocalizationId, binaryFactory);
                }

                return(binaryFactory);
            }
        }
        internal static IBinaryFactory GetBinaryFactory(Localization localization)
        {
            lock (_binaryFactories)
            {
                IBinaryFactory binaryFactory;
                if (!_binaryFactories.TryGetValue(localization.LocalizationId, out binaryFactory))
                {
                    IPublicationResolver publicationResolver = new PublicationResolver(localization);
                    IProvidersCommonServices providersCommonServices = new ProvidersCommonServices(publicationResolver, _logger, _config);
                    IFactoryCommonServices factoryCommonServices = new FactoryCommonServices(publicationResolver, _logger, _config, CreateCacheAgent());
                    binaryFactory = new BinaryFactory(
                        new TridionBinaryProvider(providersCommonServices),
                        factoryCommonServices);
                    _binaryFactories.Add(localization.LocalizationId, binaryFactory);
                }

                return binaryFactory;
            }
        }
示例#5
0
        internal static IPageFactory GetPageFactory(Localization localization)
        {
            lock (_pageFactories)
            {
                IPageFactory pageFactory;
                if (!_pageFactories.TryGetValue(localization.LocalizationId, out pageFactory))
                {
                    IPublicationResolver     publicationResolver     = new PublicationResolver(localization);
                    IProvidersCommonServices providersCommonServices = new ProvidersCommonServices(publicationResolver, _logger, _config);
                    IFactoryCommonServices   factoryCommonServices   = new FactoryCommonServices(publicationResolver, _logger, _config, CreateCacheAgent());
                    pageFactory = new PageFactory(
                        new TridionPageProvider(providersCommonServices),
                        GetComponentPresentationFactory(localization),
                        factoryCommonServices
                        );
                    _pageFactories.Add(localization.LocalizationId, pageFactory);
                }

                return(pageFactory);
            }
        }
        internal static IPageFactory GetPageFactory(Localization localization)
        {
            lock (_pageFactories)
            {
                IPageFactory pageFactory;
                if (!_pageFactories.TryGetValue(localization.LocalizationId, out pageFactory))
                {
                    IPublicationResolver publicationResolver = new PublicationResolver(localization);
                    IProvidersCommonServices providersCommonServices = new ProvidersCommonServices(publicationResolver, _logger, _config);
                    IFactoryCommonServices factoryCommonServices = new FactoryCommonServices(publicationResolver, _logger, _config, CreateCacheAgent());
                    pageFactory = new PageFactory(
                        new TridionPageProvider(providersCommonServices), 
                        GetComponentPresentationFactory(localization), 
                        factoryCommonServices
                        ); 
                    _pageFactories.Add(localization.LocalizationId, pageFactory);
                }

                return pageFactory;
            }
        }