add automated language string extraction to utility

This commit is contained in:
Matthias Mailänder
2014-04-19 20:14:42 +02:00
parent c9a49538d6
commit 69d86cfcf2
5 changed files with 83 additions and 4 deletions

View File

@@ -111,9 +111,13 @@ namespace OpenRA
public IEnumerable<Type> GetTypesImplementing<T>()
{
var it = typeof(T);
return GetTypes().Where(t => t != it && it.IsAssignableFrom(t));
}
public IEnumerable<Type> GetTypes()
{
return assemblies.Select(ma => ma.First).Distinct()
.SelectMany(ma => ma.GetTypes()
.Where(t => t != it && it.IsAssignableFrom(t)));
.SelectMany(ma => ma.GetTypes());
}
[AttributeUsage(AttributeTargets.Constructor)]