コード例 #1
0
 public BeerXmlResolver(IOptions <DatabaseSettings> databaseSettings, IOptions <ElasticSearchSettings> elasticSearchSettings,
                        IFermentableElasticsearch fermentableElasticsearch, IHopElasticsearch hopElasticsearch, IHopRepository hopRepository,
                        IOtherElasticsearch otherElasticsearch, IYeastElasticsearch yeastElasticsearch, IOtherRepository otherRepository, IOtherService otherService)
 {
     _databaseSettings         = databaseSettings;
     _elasticSearchSettings    = elasticSearchSettings;
     _fermentableElasticsearch = fermentableElasticsearch;
     _hopElasticsearch         = hopElasticsearch;
     _hopRepository            = hopRepository;
     _otherElasticsearch       = otherElasticsearch;
     _yeastElasticsearch       = yeastElasticsearch;
     _otherRepository          = otherRepository;
     _otherService             = otherService;
 }
コード例 #2
0
 public void Init()
 {
     TestUtil.FlushRedisStore();
     TestUtil.DeleteDataInDatabase();
     TestUtil.InsertDataDatabase();
     AutoMapperConfiguration.Configure();
     _context = new MicrobrewitContext();
     _repository = new YeastRepository();
     _yeastElasticsearch = new YeastElasticsearch();
     _yeastService = new YeastService(_repository,_yeastElasticsearch);
     _controller = new YeastController(_yeastService);
     _node = new Uri("http://localhost:9200");
     _settings = new ConnectionSettings(_node, defaultIndex: Setting.ElasticSearchIndex);
     _client = new ElasticClient(_settings);
 }
コード例 #3
0
 public void Init()
 {
     TestUtil.FlushRedisStore();
     TestUtil.DeleteDataInDatabase();
     TestUtil.InsertDataDatabase();
     AutoMapperConfiguration.Configure();
     _context            = new MicrobrewitContext();
     _repository         = new YeastRepository();
     _yeastElasticsearch = new YeastElasticsearch();
     _yeastService       = new YeastService(_repository, _yeastElasticsearch);
     _controller         = new YeastController(_yeastService);
     _node     = new Uri("http://localhost:9200");
     _settings = new ConnectionSettings(_node, defaultIndex: Setting.ElasticSearchIndex);
     _client   = new ElasticClient(_settings);
 }
コード例 #4
0
 public YeastService(IYeastRepository  yeastRepository,IYeastElasticsearch yeastElasticsearch)
 {
     _yeastRepository = yeastRepository;
     _yeastElasticsearch = yeastElasticsearch;
 }
コード例 #5
0
 public YeastService(IYeastRepository yeastRepository, IYeastElasticsearch yeastElasticsearch, ILogger <YeastService> logger)
 {
     _logger             = logger;
     _yeastRepository    = yeastRepository;
     _yeastElasticsearch = yeastElasticsearch;
 }
コード例 #6
0
 public YeastService(IYeastRepository yeastRepository, IYeastElasticsearch yeastElasticsearch)
 {
     _yeastRepository    = yeastRepository;
     _yeastElasticsearch = yeastElasticsearch;
 }