internal MercuryUser GetUser(string userId, HostedMercuryServer server) { if (_users == null) { return(null); } if (!_users.ContainsKey(userId)) { return(null); } var user = new MercuryUser(_users[userId]); user.SetServer(server); return(user); }
internal virtual MercuryUser GetUserWithConnectionId(string connectionId, HostedMercuryServer server) { if (_users == null) { return(null); } foreach (var user in _users) { if (user.Value.HasConnectionId(connectionId)) { var result = new MercuryUser(user.Value); result.SetServer(server); return(result); } } return(null); }