public static IEnumerable<Type> GetSuperClasses(this Type type,
bool allowAbstract = false, bool allowSelf = true)
=>
from assembly in AppDomain.CurrentDomain.GetAssemblies()
from t in assembly.GetTypes()
where t.IsAssignableFrom(type)
&& t != typeof(object)
&& (allowAbstract || (!t.IsAbstract && !t.IsInterface))
&& (allowSelf || t != type)
select t;