Example #1
0
 protected override void Context()
 {
     _stubContributors = new[]
     {
         new StubElasticsearchIndexCreationContributor(true, 3),
         new StubElasticsearchIndexCreationContributor(true, 2),
         new StubElasticsearchIndexCreationContributor(true, 1)
     };
     _strategy = new StubElasticsearchIndexCreationStrategy(SharedContext.Client.Object, _stubContributors.ToArray());
 }
 protected override void Context()
 {
     _strategy = new StubElasticsearchIndexCreationStrategy(SharedContext.Client.Object, Contributors().ToArray());
 }
 public IndexManager(IElasticClient client, IElasticsearchIndexCreationStrategy indexStrategy)
 {
     this.client        = client;
     this.indexStrategy = indexStrategy;
 }
Example #4
0
 public static void RegisterIndexStrategy(IElasticsearchIndexCreationStrategy strategy)
 {
     indexStrategy = strategy;
     LogHelper.Info <IElasticsearchIndexCreationStrategy>($"Registered index strategy [{strategy.GetType().Name}]");
 }