Example #1
0
 public void RemoveServer(string baseUrl)
 {
     lock (_lck)
     {
         ServerMap.RemoveAll(m => m.BaseUrl == baseUrl);
     }
 }
Example #2
0
        public void AddServer(string baseUrl, string[] ips)
        {
            lock (_lck)
            {
                ServerMap.RemoveAll(m => m.BaseUrl == baseUrl);

                foreach (var ip in ips)
                {
                    var svr = new Server();
                    svr.BaseUrl  = baseUrl;
                    svr.ClientIp = ip;

                    ServerMap.Add(svr);
                }
            }
        }