Example #1
0
 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)));
 }
Example #2
0
        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);
        }