/// <summary> /// Construct a sink posting to the specified database. /// </summary> /// <param name="batchSizeLimit">The maximum number of events to include in a single batch.</param> /// <param name="period">The time to wait between checking for event batches.</param> protected PortablePeriodicBatchingSink(int batchSizeLimit, TimeSpan period) { _batchSizeLimit = batchSizeLimit; _queue = new Queue <LogEvent>(); _timer = new PortableTimer(cancel => OnTick()); _status = new PortableBatchedConnectionStatus(period); }
/// <summary> /// Construct a sink posting to the specified database. /// </summary> /// <param name="batchSizeLimit">The maximum number of events to include in a single batch.</param> /// <param name="period">The time to wait between checking for event batches.</param> protected PortablePeriodicBatchingSink(int batchSizeLimit, TimeSpan period) { _batchSizeLimit = batchSizeLimit; _queue = new Queue<LogEvent>(); _timer = new PortableTimer(cancel => OnTick()); _status = new PortableBatchedConnectionStatus(period); }