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)); }
/// <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)); }
private IQueue <TMessage, TMessageId> GetQueue <TMessage, TMessageId>(QueueType?queueType = null) { queueType = queueType ?? QueueType; return((IQueue <TMessage, TMessageId>)Queues.First(q => q.QueueType == queueType)); }