public TimeAndCountBasedLifetimeSupervisor(TimeSpan notificationLifetime, MaximumNotificationCount maximumNotificationCount)
        {
            _notifications = new NotificationsList();

            _notificationLifetime     = notificationLifetime;
            _maximumNotificationCount = maximumNotificationCount.Count;

            _interval = new Interval();
        }
예제 #2
0
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;
            _notifications?.Clear();
            _notifications = null;
        }
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;
            _interval?.Stop();
            _interval = null;
            _notifications?.Clear();
            _notifications = null;
            _notificationsPending?.Clear();
        }
예제 #4
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                _notifications?.Clear();
                _notifications = null;
            }

            _disposed = true;
        }
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                _interval?.Stop();
                _interval = null;
                _notifications?.Clear();
                _notifications = null;
                _notificationsPending?.Clear();
            }

            _disposed = true;
        }
예제 #6
0
        public CountBasedLifetimeSupervisor(MaximumNotificationCount maximumNotificationCount)
        {
            _maximumNotificationCount = maximumNotificationCount.Count;

            _notifications = new NotificationsList();
        }