public bool IsMatch <TItem>(AbstractDependency <TItem> dependency) where TItem : AbstractItem <TItem> { if (!_markerPattern.IsMatch(dependency.MarkerSet)) { return(false); } else { return(_evals.All(e => e.Predicate(GetValue(dependency, e.LeftOrNullForConstant), GetValue(dependency, e.RightOrNullForConstant)))); } }
public MatchResult Matches <TItem>([NotNull] AbstractItem <TItem> item, [CanBeNull] string[] references = null) where TItem : AbstractItem <TItem> { return(_markerPattern.IsMatch(item.MarkerSet) ? _itemPattern.Matches(item, _inverse, references) : _inverse?SUCCESS : FAIL); }