I am trying to better understand the IUserCollectionType interface, but it seems more complicated than it needs to be. As I understand, the purpose of this interface is to pair a transient collection together with a persistent collection, then make that pair available as a collection type. This is accomplished via the interface's two Instantiate() overloads, along with its Wrap() method.
It appears, however, that the Contains(), IndexOf(), and ReplaceElements() methods are never called by NH. So my first question: why not just remove those methods, so that we don't have to complicate our IUserCollectionType implementations with them? And why not also remove the GetElements() method since all collections implement IEnumerable anyway? Final question: why not make all the "collection" method parameters (and return types) be of type 'ICollection' instead of 'object'? I think we can safely assume ICollection as the lowest common denominator of any custom collection type in .NET.
