public WorkingConditionExpression CreateChild(ConditionType logicalConnector) { var expression = new WorkingConditionExpression() { LogicalConnector = logicalConnector }; Children.Add(expression); return(expression); }
private WorkingConditionExpression ToWorkingConditionExpression(ConditionExpression parent) { var working = new WorkingConditionExpression(); working.LogicalConnector = this.LogicalConnector; foreach (var statement in this.Statements) { working.Statements.Add(statement.ToWorkingConditionStatement()); } foreach (var child in this.Children) { var newChild = working.CreateChild(); newChild.Add(child.ToWorkingConditionExpression()); } return(working); }
public void Add(WorkingConditionExpression expression) { Children.Add(expression); }