示例#1
0
        public SoodaOrderBy(string columnName, SortOrder sortOrder)
        {
            SoodaObjectExpressionComparer ec = new SoodaObjectExpressionComparer();

            ec.AddExpression(SoqlParser.ParseExpression(columnName), sortOrder);
            _comparer = ec;
        }
示例#2
0
        private void AssertExpression(string s, object expectedValue)
        {
            SoqlExpression    expr = SoqlParser.ParseExpression(s);
            SoqlPrettyPrinter pp   = new SoqlPrettyPrinter(Console.Out);

            pp.PrintExpression(expr);
            object val = expr.Evaluate(null);

            Console.WriteLine(" = {0} (expected {1})", val, expectedValue);
            Assert.AreEqual(expectedValue, val);
        }