Ejemplo n.º 1
0
        public virtual StatsServer[] GetServers()
        {
            ServerAdmin srvAdmin = new ServerAdmin();

            PrepareProxy(srvAdmin);

            ServerInfoArrayResult result = srvAdmin.GetServers(Username, Password);

            if (result.Servers == null)
            {
                return new StatsServer[] { }
            }
            ;

            StatsServer[] servers = new StatsServer[result.Servers.Length];
            for (int i = 0; i < servers.Length; i++)
            {
                servers[i]          = new StatsServer();
                servers[i].ServerId = result.Servers[i].ServerID;
                servers[i].Name     = result.Servers[i].Name;
                servers[i].Ip       = result.Servers[i].IP;
            }

            return(servers);
        }
Ejemplo n.º 2
0
        public virtual StatsServer[] GetServers()
        {
            ServerAdmin srvAdmin = new ServerAdmin();
            PrepareProxy(srvAdmin);

            ServerInfoArrayResult result = srvAdmin.GetServers(Username, Password);
            if (result.Servers == null)
                return new StatsServer[] { };

            StatsServer[] servers = new StatsServer[result.Servers.Length];
            for (int i = 0; i < servers.Length; i++)
            {
                servers[i] = new StatsServer();
                servers[i].ServerId = result.Servers[i].ServerID;
                servers[i].Name = result.Servers[i].Name;
                servers[i].Ip = result.Servers[i].IP;
            }

            return servers;
        }