public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { // Disable SSL certificate validation ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; var url = Environment.GetEnvironmentVariable("ELASTICSEARCH_URL"); if (string.IsNullOrEmpty(url)) { Assert.Inconclusive("The environment variabel named 'ELASTICSEARCH_URL' isn't set. Set it to e.g. 'http://localhost:9200'"); } _resolver = eventFlowOptions .ConfigureElasticsearch(new Uri(url)) .UseElasticsearchReadModel<ElasticsearchTestAggregateReadModel>() .CreateResolver(); _elasticClient = _resolver.Resolve<IElasticClient>(); _readModelPopulator = _resolver.Resolve<IReadModelPopulator>(); _readModelDescriptionProvider = _resolver.Resolve<IReadModelDescriptionProvider>(); _readModelStore = _resolver.Resolve<IElasticsearchReadModelStore<ElasticsearchTestAggregateReadModel>>(); return _resolver; }
public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { // Disable SSL certificate validation ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); }; var url = Environment.GetEnvironmentVariable("ELASTICSEARCH_URL"); if (string.IsNullOrEmpty(url)) { Assert.Inconclusive("The environment variabel named 'ELASTICSEARCH_URL' isn't set. Set it to e.g. 'http://localhost:9200'"); } _resolver = eventFlowOptions .ConfigureElasticsearch(new Uri(url)) .UseElasticsearchReadModel <ElasticsearchTestAggregateReadModel>() .CreateResolver(); _elasticClient = _resolver.Resolve <IElasticClient>(); _readModelPopulator = _resolver.Resolve <IReadModelPopulator>(); _readModelDescriptionProvider = _resolver.Resolve <IReadModelDescriptionProvider>(); _readModelStore = _resolver.Resolve <IElasticsearchReadModelStore <ElasticsearchTestAggregateReadModel> >(); return(_resolver); }