Exemplo n.º 1
0
		public static void Add(Guid uid)
		{
			if (ClientInfos.Any(x => x.UID == uid))
				return;

			var clientInfo = new ClientInfo();
			clientInfo.UID = uid;
			ClientInfos.Add(clientInfo);
		}
Exemplo n.º 2
0
		public static List<FS2Callbac> Get(ClientInfo clientInfo)
		{
			lock (FSAgentCallbacCashes)
			{
				var result = new List<FS2Callbac>();
				var safeCopy = FSAgentCallbacCashes.ToList();
				foreach (var callbackResultSaver in safeCopy)
				{
					if (callbackResultSaver.Index > clientInfo.CallbackIndex)
					{
						result.Add(callbackResultSaver.FS2Callbac);
					}
				}
				if (safeCopy.Count > 0)
				{
					clientInfo.CallbackIndex = safeCopy.Max(x => x.Index);
				}
				return result;
			}
		}