private static async Task WaitProcessingCompletion(IReceivedNotificationProcessor processor)
        {
            while (processor.ProcessingCount != 0)
            {
                await Task.Delay(TimeSpan.FromMilliseconds(5));
            }

            // wait notification completion
            await Task.Delay(TimeSpan.FromSeconds(1));
        }
Пример #2
0
        public NotificationHub(
            IPollingJob pollingJob,
            INotificationsChannel channel,
            IReceivedNotificationProcessor notificationProcessor)
        {
            Require.NotNull(pollingJob, "pollingJob");
            Require.NotNull(channel, "channel");
            Require.NotNull(notificationProcessor, "notificationProcessor");

            m_pollingJob            = pollingJob;
            m_channel               = channel;
            m_notificationProcessor = notificationProcessor;
        }