title: Get all 'where' calls using ExpressionVisitor
body: <p>I have a query, like such:</p>
  
  <pre><code>var query = from sessions in dataSet
                      where (names.Contains(sessions.Username))
                      where (sessions.Login.TimeOfAction == dt)                    
                      select new {    sessions.Username, 
                                      sessions.Login, 
                                      sessions.Logout, sessions.Duration };
  </code></pre>
  
  <p>I want to implement an ExpressionVisitor to extract BOTH the where clauses as Lambda's, but so far have only been able to get the first using a class called 'InnermostWhereFinder' that comes from the MSDN tutorial on a custom query provider for the TerraServer web-service. </p>
  
  <p>It is:</p>
  
  <pre><code>internal class InnermostWhereFinder : ExpressionVisitor
      {
          private MethodCallExpression innermostWhereExpression;
  
          public MethodCallExpression GetInnermostWhere(Expression expression)
          {
              Visit(expression); 
              return innermostWhereExpression;
          }
  
          protected override Expression VisitMethodCall(MethodCallExpression expression)
          {
              if (expression.Method.Name == "Where")
                  innermostWhereExpression = expression;
  
              Visit(expression.Arguments[0]);
  
              return expression;
          }
      }
  </code></pre>
  
  <p>Ive tried tweaking this class heavily to return both where clauses with no success. Couldn't find any great documentation on this, can anyone help? This will ultimately need to result in multiple LambdaExpression objects I can work with, I think. </p>