Exemplo n.º 1
0
        protected override void VisitMethodCall(MethodCallExpression m)
        {
            Visit(m.Object);
            VisitExpressionList(m.Arguments);

            if (OptimizeableMethodConstrains.IsStringMethod(m.Method))
            {
                ProcessStringMethod(m);
                return;
            }

            if (OptimizeableMethodConstrains.IsIListOrICollectionOfTMethod(m.Method))
            {
                ProcessCollectionMethod(m);
                return;
            }

            AnalyseMethod(Recorder, m.Method);
        }
Exemplo n.º 2
0
 private static bool IsOptimizeableMethodCall(MethodCallExpression expression)
 {
     return(OptimizeableMethodConstrains.CanBeOptimized(expression.Method));
 }