public void Remove(ClientRegisterInfo entity) { lock (SyncOperator) { clientList.Remove(entity); } }
/// <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; } } }