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