示例#1
0
文件: DBCalc.cs 项目: jschmer/dynasql
        //
        // 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);
        }
示例#2
0
文件: DBCalc.cs 项目: jschmer/dynasql
        internal static DBCalc Calculate()
        {
            DBCalcRef cref = new DBCalcRef();

            return(cref);
        }