示例#1
0
 public void Remove(ClientRegisterInfo entity)
 {
     lock (SyncOperator)
     {
         clientList.Remove(entity);
     }
 }
示例#2
0
        /// <summary>
        /// 记录客户端
        /// </summary>
        /// <param name="entity"></param>
        public void Add(ClientRegisterInfo entity)
        {
            if (entity == null)
            {
                return;
            }
            lock (SyncOperator)
            {
                var findClient = clientList.FirstOrDefault(
                    t => t.ClientName == entity.ClientName
                    );

                if (findClient == null)
                {
                    clientList.Add(entity);
                }
                else
                {
                    findClient.NotifyCallBack = entity.NotifyCallBack;
                }
            }
        }