コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }