示例#1
0
        public SmartCMServerListFacts()
        {
            var configuration = new SteamConfiguration {
                AllowDirectoryFetch = false
            };

            serverList = new SmartCMServerList(configuration);
        }
        public static ServerRecord GetServerRecord()
        {
            var validRecord = _servers
                              .FirstOrDefault(t => t.Value < CountForChange && !BadRecords.Contains(t.Key)).Key;

            if (validRecord == null)
            {
                var serverList = new SmartCMServerList(SteamConfiguration.Create(b => b.WithProtocolTypes(ProtocolTypes.Tcp)));
                _servers = serverList.GetAllEndPoints()
                           .Where(t => t.ProtocolTypes.HasFlag(ProtocolTypes.Tcp))
                           .ToDictionary(t => t, t => 0);
                BadRecords.Clear();
                return(GetServerRecord());
            }
            _servers[validRecord] = _servers[validRecord] + 1;

            return(validRecord);
        }
示例#3
0
        public SmartCMServerListFacts()
        {
            var configuration = SteamConfiguration.Create(b => b.WithDirectoryFetch(false));

            serverList = new SmartCMServerList(configuration);
        }
示例#4
0
 static CMClient()
 {
     Servers = new SmartCMServerList();
     Servers.UseInbuiltList();
 }
示例#5
0
 public SmartCMServerListFacts()
 {
     serverList = new SmartCMServerList();
 }
 public SmartCMServerListFacts()
 {
     serverList = new SmartCMServerList(new NullServerListProvider(), allowDirectoryFetch: false);
 }
示例#7
0
 static CMClient()
 {
     Servers = new SmartCMServerList();
     Servers.UseInbuiltList();
 }
        static SteamServerList()
        {
            var serverList = new SmartCMServerList(SteamConfiguration.Create(b => b.WithProtocolTypes(ProtocolTypes.Tcp)));

            _servers = serverList.GetAllEndPoints().Where(t => t.ProtocolTypes.HasFlag(ProtocolTypes.Tcp)).ToDictionary(t => t, t => 0);
        }
示例#9
0
 public SmartCMServerListFacts()
 {
     serverList = new SmartCMServerList(new NullServerListProvider(), allowDirectoryFetch: false);
 }
示例#10
0
 static CMClient()
 {
     Servers = new SmartCMServerList();
 }