/// <summary> /// 检查表达式是否能够被缓存。 /// </summary> /// <param name="expression"></param> /// <returns></returns> public static CacheableCheckResult Check(Expression expression) { var checker = new CacheableChecker(); checker.Visit(expression); return(checker.result); }
/// <summary> /// 检查表达式是否能够被缓存。 /// </summary> /// <param name="evaluator"></param> /// <param name="expression"></param> /// <returns></returns> public static CacheableCheckResult Check(IExecuteCacheEvaluator evaluator, Expression expression) { var checker = new CacheableChecker { _evaluator = evaluator }; checker.Visit(expression); return(checker._result); }