public override FormFilterCondition Copy() { var copy = new FilterCombination { Type = Type, RightFilter = RightFilter.Copy(), LeftFilter = LeftFilter.Copy() }; return(copy); }
public static void MapVisibleConditionQuestionToItemId(FormFilterCondition condition, Dictionary <Guid, Guid> mapQuestions) { if (condition != null) { FilterProperty propertyFilter = condition as FilterProperty; if (propertyFilter != null) { if (mapQuestions.ContainsKey(propertyFilter.ItemId)) { propertyFilter.ItemId = mapQuestions[propertyFilter.ItemId]; } } else { FilterCombination filterCombination = condition as FilterCombination; if (filterCombination != null) { MapVisibleConditionQuestionToItemId(filterCombination.LeftFilter, mapQuestions); MapVisibleConditionQuestionToItemId(filterCombination.RightFilter, mapQuestions); } } } }