Пример #1
0
        /// <summary>
        /// operator and compose the builder with an and clause
        /// </summary>
        /// <param name="left"></param>
        /// <param name="right"></param>
        /// <returns></returns>
        public static MyConstraintBuilder operator |(MyConstraintBuilder left, MyConstraintBuilder right)
        {
            MyConstraintBuilder newbuilder = new MyConstraintBuilder();

            newbuilder.constraints.Push(new OpenBracket());
            AppendToStack(newbuilder.constraints, left.constraints);
            newbuilder.constraints.Push(new OrOperator());
            AppendToStack(newbuilder.constraints, right.constraints);
            newbuilder.constraints.Push(new CloseBracket());
            return(newbuilder);
        }
 private MyConstraintBuilder(MyConstraintBuilder original)
 {
     constraints = new Stack<Constraint>(original.constraints);
 }
 /// <summary>
 /// operator and compose the builder with an and clause
 /// </summary>
 /// <param name="left"></param>
 /// <param name="right"></param>
 /// <returns></returns>
 public static MyConstraintBuilder operator |(MyConstraintBuilder left, MyConstraintBuilder right)
 {
     MyConstraintBuilder newbuilder = new MyConstraintBuilder();
     newbuilder.constraints.Push(new OpenBracket());
     AppendToStack(newbuilder.constraints, left.constraints);
     newbuilder.constraints.Push(new OrOperator());
     AppendToStack(newbuilder.constraints, right.constraints);
     newbuilder.constraints.Push(new CloseBracket());
     return newbuilder;
 }
Пример #4
0
 private MyConstraintBuilder(MyConstraintBuilder original)
 {
     constraints = new Stack <Constraint>(original.constraints);
 }