예제 #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));
        }