public static IEnumerable<Type> GetTypesWithThisAttribute(this Type attribute, bool allowAbstract = false)
=>
from assembly in AppDomain.CurrentDomain.GetAssemblies()
from t in assembly.GetTypes()
where t.IsDefined(attribute, false)
&& (allowAbstract || (!t.IsAbstract && !t.IsInterface))
select t;