Beispiel #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);
        }
 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;
 }