コード例 #1
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;
        }
コード例 #2
0
        public PendingNotificationsChaser(
            IPendingNotifications pendingNotifications,
            INotificationHub notificationHub,
            IPollingJob pollingJob,
            ICloudBlockBlob chaserExclusiveAccessBlobLock)
        {
            Require.NotNull(pendingNotifications, "pendingNotifications");
            Require.NotNull(notificationHub, "notificationHub");
            Require.NotNull(pollingJob, "pollingJob");
            Require.NotNull(chaserExclusiveAccessBlobLock, "chaserExclusiveAccessBlobLock");

            m_pendingNotifications          = pendingNotifications;
            m_notificationHub               = notificationHub;
            m_pollingJob                    = pollingJob;
            m_chaserExclusiveAccessBlobLock = chaserExclusiveAccessBlobLock;
        }
コード例 #3
0
        private Dictionary<string, object> toDictionary(IPollingJob job)
        {
            var dict = new Dictionary<string, object>
            {
                {"chain", job.Chain.Key},
                {"title", Description.For(job).Title},
                {"type", job.JobType.FullName},
                {"interval", job.Interval},
                {"performance", job.Chain.Performance.ToDictionary()},
                {"running", job.IsRunning()},
                {"execution", job.ScheduledExecution.ToString()}
            };


            if (job.Chain.Performance.LastExecution != null)
            {
                dict.Add("last", job.Chain.Performance.LastExecution.ToHeaderDictionary());
            }



            return dict;
        } 
コード例 #4
0
        private Dictionary <string, object> toDictionary(IPollingJob job)
        {
            var dict = new Dictionary <string, object>
            {
                { "chain", job.Chain.Key },
                { "title", Description.For(job).Title },
                { "type", job.JobType.FullName },
                { "interval", job.Interval },
                { "performance", job.Chain.Performance.ToDictionary() },
                { "running", job.IsRunning() },
                { "execution", job.ScheduledExecution.ToString() }
            };


            if (job.Chain.Performance.LastExecution != null)
            {
                dict.Add("last", job.Chain.Performance.LastExecution.ToHeaderDictionary());
            }



            return(dict);
        }
コード例 #5
0
 internal PollingJobRuntimeInfo(Type implementationType, IPollingJob pollingJob)
 {
     this.implementationType = implementationType;
     this.pollingJob         = pollingJob;
 }