/// <summary> /// Constructs an empty rule builder. /// </summary> public RuleBuilder() { var rootScope = new SymbolTable(); _groupBuilder = new GroupBuilder(rootScope, GroupType.And); _actionGroupBuilder = new ActionGroupBuilder(rootScope); }
/// <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; }
/// <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); }
/// <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); }