public TimeAndCountBasedLifetimeSupervisor(TimeSpan notificationLifetime, MaximumNotificationCount maximumNotificationCount) { _notifications = new NotificationsList(); _notificationLifetime = notificationLifetime; _maximumNotificationCount = maximumNotificationCount.Count; _interval = new Interval(); }
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(); }
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; }
public CountBasedLifetimeSupervisor(MaximumNotificationCount maximumNotificationCount) { _maximumNotificationCount = maximumNotificationCount.Count; _notifications = new NotificationsList(); }