public void DeleteQueue(string path)
        {
            if (!_namespaceManager.QueueExists(path))
            {
                throw new QueueException("Queue {0} doesn't exists", path);
            }

            _namespaceManager.DeleteQueue(path);
            Queues.Remove(Queues.First(a => a.Path == path));
        }
예제 #2
0
 /// <summary>
 /// Gets the information queue.
 /// </summary>
 /// <returns>Queue</returns>
 public string GetInfoQueue()
 {
     return((Queues == null || Queues.Count == 0) ? "" : Queues.First().Value.Select(w => w.ID.ToString()).Aggregate((current, next) => current + ", " + next));
 }
예제 #3
0
 private IQueue <TMessage, TMessageId> GetQueue <TMessage, TMessageId>(QueueType?queueType = null)
 {
     queueType = queueType ?? QueueType;
     return((IQueue <TMessage, TMessageId>)Queues.First(q => q.QueueType == queueType));
 }