public void PurgeAllQueues() { using (var connection = BuildConnection()) { using (var channel = connection.CreateModel()) { foreach (var queue in Queues) { queue.Purge(channel); } var others = _endpoints.Select(x => x.QueueName).Where(x => !x.IsNotEmpty()) .Where(x => Queues.All(q => q.Name != x)).ToArray(); foreach (var other in others) { channel.QueuePurge(other); } channel.Close(); } connection.Close(); } }
public HtmlReport[] GenerateReports() { return(_reporters.Select(x => { return new HtmlReport { html = x.ToHtml(), title = x.Title, ShortTitle = x.ShortTitle, count = x.Count }; }).Union(_reports).ToArray()); }
public IEnumerable <IOaktonCommand> BuildAllCommands() { return(_commandTypes.Select(x => _commandCreator.Create(x))); }