protected override Expression VisitMethodCall(MethodCallExpression m) { if (m.IsContentIndexer()) { Expression obj = Visit(m.Object); return(Expression.Call(obj, m.Method, m.Arguments[0])); } if (Iterator == null && m.IsForEachMethod()) { Iterator = m.Arguments[1].RemoveCastToObject(); return(m.Arguments[0]); } return(base.VisitMethodCall(m)); }