コード例 #1
0
 public HttpClusterApi AddHost(string url, params string[] host)
 {
     if (url == "*")
     {
         if (host != null)
         {
             foreach (string item in host)
             {
                 DefaultNode.Add(item);
             }
         }
     }
     else
     {
         if (host != null)
         {
             url = url.ToLower();
             IHttpNode node = GetNode(url);
             if (node == null)
             {
                 node        = new HttpNode();
                 mNodes[url] = node;
             }
             foreach (string item in host)
             {
                 node.Add(item);
             }
         }
     }
     return(this);
 }
コード例 #2
0
 public HttpClusterApi AddHost(string url, IHttpNode node)
 {
     if (url == "*")
     {
         DefaultNode = node;
     }
     else
     {
         mNodes[url.ToLower()] = node;
     }
     return(this);
 }
コード例 #3
0
 public IHttpNode this[string url]
 {
     get
     {
         IHttpNode node = SearchNode(url);
         if (node == null)
         {
             node = DefaultNode;
         }
         return(node);
     }
 }