Esempio n. 1
0
 protected override Expression VisitMethodCall(MethodCallExpression node)
 {
     // => List<int>[]
     if (node.CanEvaluate())
     {
         return(this.VisitConstant(node.Evaluate()));
     }
     return(_methodVisitor.VisitMethodCall(node));
 }
Esempio n. 2
0
 /// <summary>
 /// 访问方法表达式
 /// </summary>
 /// <param name="node">方法表达式</param>
 /// <returns></returns>
 protected override Expression VisitMethodCall(MethodCallExpression node)
 {
     // => List<int>[]
     if (node.CanEvaluate())
     {
         return(this.VisitConstant(node.Evaluate()));
     }
     else
     {
         return(this.VisitMethodCall(node, MethodCallType.MethodCall));
     }
 }