Exemplo n.º 1
0
        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();
            }
        }
Exemplo n.º 2
0
 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());
 }
Exemplo n.º 3
0
 public IEnumerable <IOaktonCommand> BuildAllCommands()
 {
     return(_commandTypes.Select(x => _commandCreator.Create(x)));
 }