public void SetLinks(List <CriterionGroup> criterionGroups, List <Criterion> criterions, List <Operator> operators) { CriterionGroups = (criterionGroups ?? new List <CriterionGroup>()) .Where(x => x.SegmentId == Id) .ToList(); CriterionGroups.ForEach(criterionGroup => criterionGroup .SetLinks(criterions, operators)); }
public bool Match(IReadOnlyDictionary <string, object> properties) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } return(CriterionGroups.Aggregate(true, (current, criterionGroup) => current && criterionGroup.Match(properties))); }