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); }
private static bool IsOptimizeableMethodCall(MethodCallExpression expression) { return(OptimizeableMethodConstrains.CanBeOptimized(expression.Method)); }