private static IEnumerable <T> GetInstances <T>() => BlockTypes .Where(t => t.IsClass && typeof(T).IsAssignableFrom(t)) .Select(Activator.CreateInstance) .Cast <T>();