internal static IBinaryFactory GetBinaryFactory(Localization localization) { lock (_binaryFactories) { IBinaryFactory binaryFactory; if (!_binaryFactories.TryGetValue(localization.LocalizationId, out binaryFactory)) { binaryFactory = new BinaryFactory() { PublicationResolver = new PublicationResolver(localization) }; _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; } }