Ejemplo n.º 1
0
		/// <summary>
		/// 构造
		/// </summary>
		public GameServer()
		{
			_fileManageTaskList = ArrayList.Synchronized(new ArrayList());
			_cpuInfos = ArrayList.Synchronized(new ArrayList());
			_memoryInfoQueue = Queue.Synchronized(new Queue());
			_diskInfos = ArrayList.Synchronized(new ArrayList());
			_networkCards = ArrayList.Synchronized(new ArrayList());
			_processInfoList = ArrayList.Synchronized(new ArrayList());
			_plugInInfoList = ArrayList.Synchronized(new ArrayList());
			_gameInfoQueue = Queue.Synchronized(new Queue());
			_installedPlugInList = ArrayList.Synchronized(new ArrayList());
			_installedPlugInMap = Hashtable.Synchronized(new Hashtable());
			_serverState = ServerState.Unknown;
			_lordConfig = new LordConfig();
            _updateMsg = ArrayList.Synchronized(new ArrayList());
            _downloadMsg = new string[3] { "0", "1", "2" };

			_gameSetting = new GameSetting(this);
			_recentMessageQueue = new Queue<MessageInfo>(RecentMessageQueueLength);
            _lastCheckResult = new CheckResult();
		}
Ejemplo n.º 2
0
		public CheckResult Check(GameServer server)
		{
			CheckResult result = new CheckResult();

			foreach(AlertCondition condition in _alertConditions)
			{
				if (!condition.Check(server))
				{
					result.AlertConditions.Add(condition);
				}
			}

			return result;
		}