public void AddEndpoint(RoomEndpoint endpoint) { if (!DoesEndpointExist(endpoint)) { RoomEndpoints.Add(endpoint); } }
public void RemoveEndpoint(RoomEndpoint endpoint) { if (DoesEndpointExist(endpoint)) { var existingParticipant = RoomEndpoints.Single(x => x.EndpointId == endpoint.EndpointId); RoomEndpoints.Remove(existingParticipant); UpdateStatus(); } }
public bool DoesEndpointExist(RoomEndpoint endpoint) { return(RoomEndpoints.Any(x => x.EndpointId == endpoint.EndpointId)); }