Esempio n. 1
0
        public static ElasticsearchSinkState Create(ElasticsearchSinkOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }
            var state = new ElasticsearchSinkState(options);

            if (state.Options.AutoRegisterTemplate)
            {
                state.RegisterTemplateIfNeeded();
            }
            return(state);
        }
 public static ElasticsearchSinkState Create(ElasticsearchSinkOptions options)
 {
     if (options == null) throw new ArgumentNullException("options");
     var state = new ElasticsearchSinkState(options);
     if (state.Options.AutoRegisterTemplate)
         state.RegisterTemplateIfNeeded();
     return state;
 }
        /// <summary>
        /// Creates a new ElasticsearchSink instance with the provided options
        /// </summary>
        /// <param name="options">Options configuring how the sink behaves, may NOT be null</param>
        public ElasticsearchSink(ElasticsearchSinkOptions options)
            : base(options.BatchPostingLimit, options.Period)
        {
	        _state = ElasticsearchSinkState.Create(options);
            _state.RegisterTemplateIfNeeded();
        }
 /// <summary>
 /// Creates a new ElasticsearchSink instance with the provided options
 /// </summary>
 /// <param name="options">Options configuring how the sink behaves, may NOT be null</param>
 public ElasticsearchSink(ElasticsearchSinkOptions options)
     : base(options.BatchPostingLimit, options.Period)
 {
     _state = ElasticsearchSinkState.Create(options);
     _state.RegisterTemplateIfNeeded();
 }