protected virtual void Dispose(bool disposing) { if (disposing) { Flush(); if (_startedTasks.Any()) { Task.WaitAll(_startedTasks.ToArray()); } } if (NextStore != null) { NextStore.Dispose(); } }
public virtual void Initialise(string partitionId, string receivedAtHour) { PartitionId = partitionId; ReceivedAtHour = receivedAtHour; if (MaxBufferTime.HasValue) { _flushStopwatch = Stopwatch.StartNew(); } var nextLevel = (Level + 1).ToString(); try { NextStore = Container.Instance.Resolve <IEventStore>(nextLevel); if (NextStore != null) { NextStore.Initialise(partitionId, receivedAtHour); } } catch { } }