public bool Equals(Category other) { return(HasFeatures.TrueForAll(ft => other.HasFeatures.Contains(ft)) && other.HasFeatures.TrueForAll(ft => HasFeatures.Contains(ft)) && NotFeatures.TrueForAll(ft => other.NotFeatures.Contains(ft)) && other.NotFeatures.TrueForAll(ft => NotFeatures.Contains(ft))); }
public bool IsMatch(Lingon lingon) { var has = HasFeatures.TrueForAll(ft => lingon.Features.Contains(ft)); var not = NotFeatures.TrueForAll(ft => !lingon.Features.Contains(ft)); return(has && not); }