Exemplo n.º 1
0
        //
        // static factory methods
        //

        #region public static DBCalc Calculate(DBClause left, BinaryOp op, DBClause right)
        /// <summary>
        /// Creates a new binary calculation with the left, op and right arguments
        /// </summary>
        /// <param name="left"></param>
        /// <param name="op"></param>
        /// <param name="right"></param>
        /// <returns></returns>
        public static DBCalc Calculate(DBClause left, BinaryOp op, DBClause right)
        {
            if (null == left)
            {
                throw new ArgumentNullException("left");
            }
            if (null == right)
            {
                throw new ArgumentNullException("right");
            }

            DBCalcRef cref = new DBCalcRef();

            cref.BinaryOp = op;
            cref.Left     = left;
            cref.Right    = right;

            return(cref);
        }
Exemplo n.º 2
0
        internal static DBCalc Calculate()
        {
            DBCalcRef cref = new DBCalcRef();

            return(cref);
        }