public static IEnumerable<Type> GetHierarchy(this Type target, bool allowAbstract = true, bool includeSelf = true) => target .GetSuperClasses(allowAbstract, false) .Concat(target .GetSubclasses(allowAbstract, includeSelf));