Esempio n. 1
0
        public HttpClusterApi AddHost(string url, string host, int weight = 10)
        {
            url = url.ToLower();
            IApiNode node = OnGetNode(url);

            if (node == null)
            {
                node = CreateUrlNode(url);
            }
            node.Add(host, weight);
            return(this);
        }
Esempio n. 2
0
 public HttpClusterApi AddHost(string url, string host, int weight = 10)
 {
     if (url == "*")
     {
         DefaultNode.Add(host, weight);
     }
     else
     {
         url = url.ToLower();
         IApiNode node = OnGetNode(url);
         if (node == null)
         {
             node = CreateUrlNode(url);
         }
         node.Add(host, weight);
     }
     return this;
 }