//------------------------------------------------------------------------- public ClientInfo getClientInfo(IRpcSession s) { ClientInfo client_info = null; lock (MapClientInfoLock) { MapClientInfo.TryGetValue(s, out client_info); } return(client_info); }
//------------------------------------------------------------------------- public ClientInfo getClientInfoThenRemove(IRpcSession s) { ClientInfo client_info = null; lock (MapClientInfoLock) { if (MapClientInfo.TryGetValue(s, out client_info)) { MapClientInfo.Remove(s); } } return(client_info); }