-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Add proxies to HashedSet without causing initialization...
PostPosted: Tue Jul 25, 2006 3:59 am 
Beginner
Beginner

Joined: Thu Dec 08, 2005 6:49 pm
Posts: 49
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.