public void Add(IHostedConnection hostedConnection) { if (connections.Any(x => x.Id == hostedConnection.Id)) { throw new ConnectionAlreadyAddedException(); } connections.Add(hostedConnection); }
public bool Remove(IHostedConnection hostedConnection) { if (connections.Contains(hostedConnection)) { connections.Remove(hostedConnection); return true; } return false; }