I need to store a bunch of proxied objects in a HashedSet<T> without them being initialized.
Unfortunately since HashedSet uses a Dictionary and Dictionary is a hash table, it is calling GetHashCode() on every item. Since GetHashCode is a public and therefore virtual method, NH is initializing the objects.
What is my best option to get around this (other than implementing my own ISet<T> that internally uses arrays or something)?
As long as a given method doesn't touch any fields, there shouldn't be any issue with it being called.
Nathan
|