コード例 #1
0
 protected BaseIndexer(ILogger <BaseIndexer <TIndex, TEntity> > logger,
                       IElasticSearchService elasticSearchService,
                       IIndexConverter <TIndex, TEntity> converter)
 {
     _converter            = converter ?? throw new ArgumentNullException(nameof(converter));
     _elasticSearchService = elasticSearchService ?? throw new ArgumentNullException(nameof(elasticSearchService));
     Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
コード例 #2
0
 public SupplierIndexItemIndexer(ISupplierRepository supplierRepository,
                                 ILogger <BasePagedIndexer <SupplierIndexItem, SupplierDbModel> > logger,
                                 IElasticSearchService elasticSearchService,
                                 IIndexConverter <SupplierIndexItem, SupplierDbModel> converter,
                                 IPagedIndexerConfiguration configuration)
     : base(logger, elasticSearchService, converter, configuration)
 {
     _supplierRepository = supplierRepository;
 }
コード例 #3
0
 public CategoryIndexItemIndexer(ICategoryRepository categoryRepository,
                                 ILogger <BasePagedIndexer <CategoryIndexItem, CategoryDbModel> > logger,
                                 IElasticSearchService elasticSearchService,
                                 IIndexConverter <CategoryIndexItem, CategoryDbModel> converter,
                                 IPagedIndexerConfiguration configuration)
     : base(logger, elasticSearchService, converter, configuration)
 {
     _categoryRepository = categoryRepository;
 }
コード例 #4
0
        protected BasePagedIndexer(ILogger <BasePagedIndexer <TIndex, TEntity> > logger,
                                   IElasticSearchService elasticSearchService,
                                   IIndexConverter <TIndex, TEntity> converter,
                                   IPagedIndexerConfiguration configuration)
            : base(logger, elasticSearchService, converter)
        {
            _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));

            if (_configuration.PageSize <= 0)
            {
                throw new InvalidOperationException("Configuration page size must be superior to zero");
            }
        }
コード例 #5
0
 internal Formatter(bool oldStyle, IIndexConverter converter)
 {
     useOldStyle    = oldStyle;
     line           = (oldStyle ? Color.Black : Color.White);
     this.converter = converter;
 }