示例#1
0
        protected override void VisitGroup(ConstraintGroup node)
        {
            IConstraint where = null;

            for (int i = 0, c = node.Items.Count; i < c; i++)
            {
                this.Visit(node.Items[i]);

                if (i == 0)
                {
                    where = _whereResult;
                }
                else
                {
                    string op = node.Operators[i - 1];
                    if (op == Constraint.AndOperator)
                    {
                        where = f.And(where, _whereResult);
                    }
                    else if (op == Constraint.OrOperator)
                    {
                        where = f.Or(where, _whereResult);
                    }
                }
            }

            _whereResult = where;
        }
示例#2
0
        protected override void VisitGroup(ConstraintGroup node)
        {
            IConstraint where = null;

            for (int i = 0, c = node.Items.Count; i < c; i++)
            {
                this.Visit(node.Items[i]);

                if (i == 0)
                {
                    where = _whereResult;
                }
                else
                {
                    string op = node.Operators[i - 1];
                    if (op == Constraint.AndOperator)
                    {
                        where = f.And(where, _whereResult);
                    }
                    else if (op == Constraint.OrOperator)
                    {
                        where = f.Or(where, _whereResult);
                    }
                }
            }

            _whereResult = where;
        }
 public async Task SaveConstraintGroup(ConstraintGroup constraintGroup)
 {
     await _constraintGroupsCollection.ReplaceOneAsync(x => x.Id == constraintGroup.Id, constraintGroup, new UpdateOptions
     {
         IsUpsert = true
     });
 }
示例#4
0
 protected virtual void VisitGroup(ConstraintGroup node)
 {
 }
示例#5
0
 protected virtual void VisitGroup(ConstraintGroup node)
 {
 }