clean up LoadModAssemblies nonsense a bit

This commit is contained in:
Chris Forbes
2010-03-16 20:03:19 +13:00
parent 3d77bcac69
commit 2e8053257f
2 changed files with 10 additions and 5 deletions

View File

@@ -20,6 +20,8 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
namespace OpenRA
{
@@ -35,5 +37,10 @@ namespace OpenRA
foreach( var ee in e )
fn( ee );
}
public static IEnumerable<string> GetNamespaces(this Assembly a)
{
return a.GetTypes().Select(t => t.Namespace).Distinct().Where(n => n != null);
}
}
}