title: ParallelQuery with methods that take in an IEnumerable
body: <p>I have a method that takes in an IEnumerable (AMethod defined below), invokes the Select extension method and returns the results. From the results returned I invoke a long running operation.</p>
  
  <p>How does the behaviour of the above scenario change if the object I pass in to AMethod is a ParallelQuery?</p>
  
  <p>My goal is to make this whole operation as parallel as possible. My concern is that extension methods are compile time and the 'Select' method inside of AMethod is not the parallel version even though the object I passed in is a ParalellQuery.</p>
  
  <p>I assume this is a common scenario and there is a cookbook solution? Do I have to create 2 versions of every method - one that takes in/returns an IEnumerable and one that takes/returns in a ParallelQuery?</p>
  
  <pre><code>void TestMethod(ICollection&lt;int&gt; coln)
  {
      var result = AMehod(coln.AsParallel()).Select(LongRunningFunction).Sum();
  }
  
  IEnumerable&lt;int&gt; AMethod(IEnumerable&lt;int&gt; param)
  {
      return param.Select(func());
  }
  
  int LongRunningFunction(T funcion)
  {
     // do complex database query and return the results
  }
  </code></pre>