/// <summary>
 /// Provides base <see cref="ElasticLowLevelClient"/> with profiling features to current <see cref="MiniProfiler"/> session.
 /// </summary>
 /// <param name="configuration">Instance of <see cref="ConnectionConfiguration"/>. Its responses will be handled and pushed to <see cref="MiniProfiler"/></param>
 public ProfiledElasticLowLevelClient(ConnectionConfiguration configuration)
     : base(configuration)
 {
     ProfilerUtils.ExcludeElasticsearchAssemblies();
     ProfilerUtils.ApplyConfigurationSettings(configuration);
     configuration.OnRequestCompleted(apiCallDetails => MiniProfilerElasticsearch.HandleResponse(apiCallDetails));
 }
Esempio n. 2
0
 /// <summary>
 /// Provides base <see cref="ElasticClient"/> with profiling features to current <see cref="MiniProfiler"/> session.
 /// </summary>
 /// <param name="configuration">Instance of <see cref="ConnectionSettings"/>. Its responses will be handled and pushed to <see cref="MiniProfiler"/></param>
 public ProfiledElasticClient(ConnectionSettings configuration)
     : base(configuration)
 {
     ProfilerUtils.ExcludeElasticsearchAssemblies();
     ProfilerUtils.ApplyConfigurationSettings(configuration);
     configuration.SetConnectionStatusHandler(response => MiniProfilerElasticsearch.HandleResponse(response, _profiler));
 }