public void Unregister(Track track) { if (track == null) { throw new ArgumentNullException("track"); } else if (!m_tracks.Remove(track)) { throw new ArgumentException("Track is not registered."); } }
public void Register(Track track) { if (track == null) { throw new ArgumentNullException("track"); } else if (m_tracks.Contains(track)) { throw new ArgumentException("Track has already been registered."); } m_tracks.Add(track); }