actually working custom lint passes

This commit is contained in:
Chris Forbes
2011-04-05 21:56:31 +12:00
parent 55c609ee16
commit 24a205d992
5 changed files with 273 additions and 229 deletions

View File

@@ -82,7 +82,15 @@ namespace OpenRA
a[ i ] = args[ key ];
}
return ctor.Invoke( a );
}
}
public IEnumerable<Type> GetTypesImplementing<T>()
{
var it = typeof(T);
return ModAssemblies.Select( ma => ma.First ).Distinct()
.SelectMany(ma => ma.GetTypes()
.Where(t => t != it && it.IsAssignableFrom(t)));
}
[AttributeUsage( AttributeTargets.Parameter )]
public class ParamAttribute : Attribute