private IRuleExpression CreateExpression(RuleEntity ruleEntity, IRuleVisitor visitor) { if (!ruleEntity.IsGroup) { return(visitor.VisitRule(ruleEntity)); } // It's a group, do recursive call var group = CreateExpressionGroup(ruleEntity.Value.Convert <int>(), visitor); group.RefRuleId = ruleEntity.Id; return(group); }
private async Task <IRuleExpression> CreateExpression(RuleEntity ruleEntity, IRuleVisitor visitor) { if (!ruleEntity.IsGroup) { return(visitor.VisitRule(ruleEntity)); } // It's a group, do recursive call. var group = await CreateExpressionGroupAsync(ruleEntity.Value.Convert <int>(), visitor); if (group != null) { group.RefRuleId = ruleEntity.Id; } return(group); }