Exemplo n.º 1
0
        public ContentExportImport(IMenuService menuService, Func <string, IContentBlobStorageProvider> themesStorageProviderFactory)
        {
            if (themesStorageProviderFactory == null)
            {
                throw new ArgumentNullException(nameof(themesStorageProviderFactory));
            }

            _menuService            = menuService;
            _contentStorageProvider = themesStorageProviderFactory(string.Empty);
        }
Exemplo n.º 2
0
        private int CountContentItemsRecursive(string folderUrl, IContentBlobStorageProvider _contentStorageProvider, string excludedFolderUrl = null)
        {
            var searchResult = _contentStorageProvider.Search(folderUrl, null);
            var retVal       = searchResult.Items.Count
                               + searchResult.Folders
                               .Where(x => excludedFolderUrl == null || !x.RelativeUrl.EndsWith(excludedFolderUrl, StringComparison.InvariantCultureIgnoreCase))
                               .Select(x => CountContentItemsRecursive(x.RelativeUrl, _contentStorageProvider))
                               .Sum();

            return(retVal);
        }
Exemplo n.º 3
0
 public ShopifyImportService(
     IShopifyRepository shopifyRepository,
     IShopifyConverter shopifyConverter,
     IPushNotificationManager notifier,
     IItemService productService,
     ICategoryService categoryService,
     ICatalogSearchService searchService,
     IPricingService pricingService,
     IPropertyService propertyService,
     Func <IContentBlobStorageProvider> contentStorageProviderFactory)
 {
     _shopifyRepository      = shopifyRepository;
     _shopifyConverter       = shopifyConverter;
     _notifier               = notifier;
     _productService         = productService;
     _categoryService        = categoryService;
     _searchService          = searchService;
     _pricingService         = pricingService;
     _propertyService        = propertyService;
     _contentStorageProvider = contentStorageProviderFactory();
 }
Exemplo n.º 4
0
 public TildaPublishingService(IContentBlobStorageProvider storageProvider, ISettingsManager settings)
 {
     _privateKey      = settings.GetValue("VirtoCommece.Tilda.PublicKey", string.Empty);
     _publicKey       = settings.GetValue("VirtoCommece.Tilda.PrivateKey", string.Empty);
     _storageProvider = storageProvider;
 }
Exemplo n.º 5
0
 public ContentExportImport(IMenuService menuService, Func <string, IContentBlobStorageProvider> themesStorageProviderFactory)
 {
     _menuService            = menuService;
     _contentStorageProvider = themesStorageProviderFactory(string.Empty);
 }
 public ContentExportImport(IMenuService menuService, Func<string, IContentBlobStorageProvider> themesStorageProviderFactory)
 {
     _menuService = menuService;
     _contentStorageProvider = themesStorageProviderFactory(string.Empty);
 }