Ejemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                Flush();

                if (_startedTasks.Any())
                {
                    Task.WaitAll(_startedTasks.ToArray());
                }
            }
            if (NextStore != null)
            {
                NextStore.Dispose();
            }
        }
Ejemplo n.º 2
0
        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 { }
        }