public ClusterStats Stats()
 {
     ClusterStats result = new ClusterStats();
     foreach (var node in mNodes.Values)
     {
         result.Items.Add(new ClusterStats.UrlStats() { Url = node.Url, Node = node });
     }
     result.Items.Add(new ClusterStats.UrlStats() { Url = "*", Node = DefaultNode });
     result.Items.Sort();
     return result;
 }
Example #2
0
        public ClusterStats Stats()
        {
            ClusterStats result = new ClusterStats();

            foreach (string key in mNodes.Keys)
            {
                if (mNodes.TryGetValue(key, out IHttpNode node))
                {
                    result.Items.Add(new ClusterStats.UrlStats()
                    {
                        Url = key, Node = node
                    });
                }
            }
            result.Items.Add(new ClusterStats.UrlStats()
            {
                Url = "*", Node = DefaultNode
            });
            result.Items.Sort();
            return(result);
        }