Example #1
0
        /// <summary>
        /// Sets filters builder.
        /// </summary>
        /// <param name="builder">Builder to set.</param>
        public void Filters(FilterGroupBuilder builder)
        {
            if (_filterGroupBuilder != null)
            {
                throw new ArgumentException($"Builder for filters is already set", nameof(builder));
            }

            _filterGroupBuilder = builder;
        }
Example #2
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);
        }
Example #3
0
        /// <summary>
        /// Retrieves filters builder.
        /// </summary>
        /// <returns>Filters builder.</returns>
        public FilterGroupBuilder Filters()
        {
            if (_filterGroupBuilder == null)
            {
                _filterGroupBuilder = new FilterGroupBuilder();
            }

            return(_filterGroupBuilder);
        }