When working with Simple Injector (or any other DI container for that matter), it is quite usual for a user to query the type system for generic types. Some very common scenarios are checking whether a type implements a closed version of a some open-generic type, or getting the list of closed types that a type implements based on an open-generic type.
In the past we decided not to add such set of extension methods to Simple Injector, because this type of problem is not related to Simple Injector itself, and it would easily cause conflicting situations when Simple Injector would be used in combination with other tools that also add similar extension methods or when such feature gets added to the BCL.
These scenarios however are so common that you see Simple Injector users reinvent the weel over and over again, while the quality of such implementation might vary. Because of this I now think it just too convenient for the user not to have these types of extension methods.
Here are three examples:
These extension methods should be placed in the SimpleInjector namespace.
Spllit Helpers class into two.
ALl Type related methods are moved to new internal Types class. Related
Related to #358
Made ToFriendlyName public
Class added with three useful extensions
GetClosedTypeOf method added.