private void TimerElapsed(object source, ElapsedEventArgs e) { var queue = repository.GetQueue(); if (!queue.Any()) { return; } operations = queue; NotifyObservers(); watchTimer.Start(); }
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); }
public List <TheQueue> GetTheQueue() { return(_queueRepository.GetQueue()); }
public IEnumerable <Ticket> Get() { return(_repositiry.GetQueue()); }