Ejemplo n.º 1
0
        public static void LoadServerLists()
        {
            try
            {
                string folder              = GetServerDataFolder();
                var    persister           = new GameManagement.ServerPersister(folder);
                var    publishedGDLServers = persister.GetPublishedGDLServerList();
                var    publishedAceServers = persister.GetPublishedACEServerList();
                var    userServers         = persister.ReadUserServers();

                var servers = new List <GameManagement.ServerPersister.ServerData>();
                servers.AddRange(publishedGDLServers);
                servers.AddRange(publishedAceServers);
                servers.AddRange(userServers);
                var distinctServers = servers.Distinct().ToList();
                foreach (var sdata in distinctServers)
                {
                    AddOrUpdateServer(sdata);
                }
                IsLoaded = true;
            }
            catch (Exception exc)
            {
                Logger.WriteError("Unable to Load server list: " + exc.ToString());
            }
        }
Ejemplo n.º 2
0
        public static void LoadServerLists()
        {
            string folder               = GetServerDataFolder();
            var    persister            = new GameManagement.ServerPersister(folder);
            var    publishedPhatServers = persister.GetPublishedPhatServerList();
            var    userServers          = persister.ReadUserServers();

            var servers = new List <GameManagement.ServerPersister.ServerData>();

            servers.AddRange(publishedPhatServers);
            servers.AddRange(userServers);
            var distinctServers = servers.Distinct().ToList();

            foreach (var sdata in distinctServers)
            {
                AddOrUpdateServer(sdata);
            }
            IsLoaded = true;
        }