Exemple #1
0
        private void RequestShowNotification([NotNull] OperationNotificationBase notification)
        {
            var notificationType = notification.GetType();

            _notificationsCounter.TryGetValue(notificationType, out var counter);
            _notificationsCounter[notificationType] = ++counter;

            notification.Show(this);
        }
Exemple #2
0
        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);
            }
        }