CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
Pretty self-explanatory - intention is to traverse base type hierarchy, not to check the same one over and over again.
As a side-note, this whole function should probably be replaced with
typeof(TValid).IsAssignableFrom(type)
Pretty self-explanatory - intention is to traverse base type hierarchy, not to check the same one over and over again. As a side-note, this whole function should probably be replaced with
typeof(TValid).IsAssignableFrom(type)