I have a Cache wrapper class that I use, which provides type safety and segmenting and other nice things.
I want to make it prevent me from shooting myself in the foot by caching an un-materialized LINQ query and only accept lists/collections...
Is there a way to detect if an IEnumerable is a LINQ query?
Maybe I'm answering my own question and should throw an exception when T is IEnumerable but not ICollection.