예제 #1
0
        private void TimerElapsed(object source, ElapsedEventArgs e)
        {
            var queue = repository.GetQueue();

            if (!queue.Any())
            {
                return;
            }
            operations = queue;
            NotifyObservers();

            watchTimer.Start();
        }
예제 #2
0
        public static async Task DispatchTo(this IEnumerable <TableEntityAdapter <MessageSchedule> > results, IQueueRepository queueRepository)
        {
            var queue = results.Select(e =>
            {
                var dispatch    = e.OriginalEntity.IsOrMap <MessageDispatch>();
                dispatch.RowKey = e.RowKey;

                // Get dispatch queue
                var sendQueue = queueRepository.GetQueue(dispatch.QueueName);
                return(dispatch.AddMessageToAsync(sendQueue));
            }).ToArray();

            await Task.WhenAll(queue);
        }
예제 #3
0
 public List <TheQueue> GetTheQueue()
 {
     return(_queueRepository.GetQueue());
 }
예제 #4
0
 public IEnumerable <Ticket> Get()
 {
     return(_repositiry.GetQueue());
 }