Example #1
0
        internal IncrementalCatalogEntryProvider(int catalogId, ESalesVariantHelper eSalesVariantHelper, ICatalogSystemMapper catalogSystemMapper,
                                                 IIndexSystemMapper indexSystemMapper)
        {
            _eSalesVariantHelper = eSalesVariantHelper;
            _catalogSystemMapper = catalogSystemMapper;

            var searchSetId = Guid.NewGuid();

            _catalogSystemMapper.StartFindItemsForIndexing(searchSetId, catalogId, true, indexSystemMapper.LastBuildDate.ToUniversalTime(),
                                                           indexSystemMapper.CurrentBuildDate);
            var entryTable      = _catalogSystemMapper.ContinueFindItemsForIndexing(searchSetId, 1, int.MaxValue - 1);
            var originalEntries = entryTable.Rows.Cast <CatalogEntryDto.CatalogEntryRow>().ToDictionary(e => e.CatalogEntryId, e => e);

            _allEntries = AppendMissingVariants(originalEntries).ToArray();
        }
 internal FullCatalogEntryProvider(int catalogId, ICatalogSystemMapper catalogSystemMapper)
 {
     _catalogSystemMapper = catalogSystemMapper;
     _searchSetId         = Guid.NewGuid();
     Count = _catalogSystemMapper.StartFindItemsForIndexing(_searchSetId, catalogId, false, null, null);
 }