public void AddFavorite(Collection collection) { lock (FavoriteCollections) { if (FavoriteCollections.Any(f => f.Matches(collection))) { return; } FavoriteCollections.Add(new FavoriteCollection(collection)); } SaveSettings(); }
public bool IsFavorite(Collection collection) => FavoriteCollections.Any(f => f.Matches(collection));