Exemplo n.º 1
0
        private void _notificationTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            var visService  = new VisService();
            var spisService = new SpisService();
            List <Notification> notifications = new List <Notification>();

            var visNotifications = visService.GetNotifications();

            if (visNotifications != null)
            {
                notifications.AddRange(visNotifications);
            }

            var spisNotifications = spisService.GetNotifications();

            if (spisNotifications != null)
            {
                notifications.AddRange(spisNotifications);
            }

            if (notifications != null)
            {
                foreach (var notification in notifications)
                {
                    Instance_NewNotification(sender, notification);
                }
            }
        }