Beispiel #1
0
 private Task _collectionWaitTask;                                           //the task started by the first message of a batch that waits for a specified time before sending the batch
 #endregion
 #region c'tor
 public TypedModelUpdateBatcher(Action <IEnumerable <TypedModelUpdate> > batchSendAction, int delayMilliseconds = 100, int maxBatchSize = int.MaxValue)
 {
     _batch             = new ConcurrentDictionary <string, TypedModelUpdate>();
     _sizeBatcher       = new SizeBatcher <TypedModelUpdate>(batchSendAction, maxBatchSize);
     _delayMilliseconds = delayMilliseconds;
 }
Beispiel #2
0
 private Task _collectionWaitTask;                                      //the task started by the first message of a batch that waits for a specified time before sending the batch
 #endregion
 #region c'tor
 public ModelUpdateLatestPropertyChangeBatcher(Action <IEnumerable <ModelUpdate> > batchSendAction, int delayMilliseconds = 100, int maxBatchSize = int.MaxValue)
 {
     _batch             = new ConcurrentDictionary <string, ModelUpdate>();
     _sizeBatcher       = new SizeBatcher <ModelUpdate>(batchSendAction, maxBatchSize);
     _delayMilliseconds = delayMilliseconds;
 }