There are currently two “helper base classes” in Power Collections, CollectionBase and DictionaryBase. These classes are there because there was a lot of boilerplate code involved in implementing the various collection interfaces, ICollection<T>, ICollection, IDictionary<T>, and IDictionary. This code begged to be put into some common base classes.

Although they served my purposes OK, they weren't very easy to use. The biggest problem was that I tried to have a single base class work for both read-only and read-write version of the collections. Making a single class work for both cases, in the end, produced a compromise that made the base classes difficult to use. The read-only class really needs to implement the modification methods with explicit interface implementation that throw NotImplementExceptions. The read-write class really should have abstract methods to force the derived class to implement them.

So in the interests of making these classes more broadly useful, I split them into ReadOnlyCollectionBase and CollectionBase, and ReadOnlyDictionaryBase and DictionaryBase. I also created ReadOnlyListBase and ListBase that do the same thing for IList and IList<T>. Although splitting the classes into read-only and read-write variants made a lot of sense, the big drawback seemed to be cluttering up the namespace. I now had six classes that were really only of interest to people writing their own collections, are are useless to the 98% of people who are just looking for a collection to use. So I put these classes into new sub-namespace: Wintellect.PowerCollections.BaseClasses. This keeps them out of the way for people browsing the documentation looking for the right class to use.

Comments?