private void RequestShowNotification([NotNull] OperationNotificationBase notification) { var notificationType = notification.GetType(); _notificationsCounter.TryGetValue(notificationType, out var counter); _notificationsCounter[notificationType] = ++counter; notification.Show(this); }
private void RequestHideNotification([NotNull] OperationNotificationBase notification, OperationCallback callback) { var notificationType = notification.GetType(); _notificationsCounter.TryGetValue(notificationType, out var counter); _notificationsCounter[notificationType] = Math.Max(--counter, 0); if (counter == 0) { notification.Hide(this, callback); } }