Example #1
0
        private static OCSEdgeServer[] GetEdgeServers(string edgeServices)
        {
            List<OCSEdgeServer> list = new List<OCSEdgeServer>();
            if (!string.IsNullOrEmpty(edgeServices))
            {
                string[] services = edgeServices.Split(';');
                foreach (string current in services)
                {
                    string[] data = current.Split(',');
                    try
                    {
                        int serviceId = int.Parse(data[1]);
                        OCSEdgeServer ocs = new OCSEdgeServer();
                        ServiceProviderProxy.Init(ocs, serviceId);
                        list.Add(ocs);
                    }
                    catch (Exception ex)
                    {
                        TaskManager.WriteError(ex);
                    }
                }
            }

            return list.ToArray();
        }
Example #2
0
 public static void AddDomain(string domainName, OCSEdgeServer[] edgeServers)
 {
     foreach (OCSEdgeServer currentEdgeServer in edgeServers)
     {
         try
         {
             currentEdgeServer.AddDomain(domainName);
         }
         catch (Exception ex)
         {
             TaskManager.WriteError(ex);
         }
     }
 }