示例#1
0
        private static object GetExpressionValue(Expression expression)
        {
            var constantExpression = expression as ConstantExpression;

            return(constantExpression != null
                ? constantExpression.Value
                : CachedExpressionCompiler.Evaluate(expression));
        }
示例#2
0
文件: Job.cs 项目: swiggins/Hangfire
        private static object GetArgumentValue(Expression expression)
        {
            Debug.Assert(expression != null);

            var constantExpression = expression as ConstantExpression;

            if (constantExpression != null)
            {
                return(constantExpression.Value);
            }

            return(CachedExpressionCompiler.Evaluate(expression));
        }