示例#1
0
        /// <summary>
        /// Constructs an empty rule builder.
        /// </summary>
        public RuleBuilder()
        {
            var rootScope = new SymbolTable();

            _groupBuilder       = new GroupBuilder(rootScope, GroupType.And);
            _actionGroupBuilder = new ActionGroupBuilder(rootScope);
        }
示例#2
0
        /// <summary>
        /// Sets right-hand side builder.
        /// </summary>
        /// <param name="builder">Builder to set.</param>
        public void RightHandSide(ActionGroupBuilder builder)
        {
            if (_rhsBuilder != null)
            {
                throw new ArgumentException($"Builder for right-hand side is already set", nameof(builder));
            }

            _rhsBuilder = builder;
        }
示例#3
0
        /// <summary>
        /// Constructs an empty rule builder.
        /// </summary>
        public RuleBuilder()
        {
            var rootScope = new SymbolTable();

            _dependencyGrouipBuilder = new DependencyGroupBuilder(rootScope);
            _filterGroupBuilder      = new FilterGroupBuilder(rootScope);
            _conditionGroupBuilder   = new GroupBuilder(rootScope, GroupType.And);
            _actionGroupBuilder      = new ActionGroupBuilder(rootScope);
        }
示例#4
0
        /// <summary>
        /// Retrieves right-hand side builder (actions).
        /// </summary>
        /// <returns>Right hand side builder.</returns>
        public ActionGroupBuilder RightHandSide()
        {
            if (_rhsBuilder == null)
            {
                _rhsBuilder = new ActionGroupBuilder();
            }

            return(_rhsBuilder);
        }