add ALL namespaces found in mod dlls - no more stupid assumption

This commit is contained in:
Chris Forbes
2010-04-04 12:57:54 +12:00
parent 93bdba6ca4
commit 7ff04ee333

View File

@@ -78,10 +78,12 @@ namespace OpenRA
foreach (var a in m.Assemblies)
{
var failures = new List<string>();
if (Verifier.IsSafe(Path.GetFullPath(a), failures))
asms.Add(Pair.New(
Assembly.LoadFile(Path.GetFullPath(a)),
Path.GetFileNameWithoutExtension(a)));
var fullpath = Path.GetFullPath(a);
if (Verifier.IsSafe(fullpath, failures))
{
var asm = Assembly.LoadFile(fullpath);
asms.AddRange(asm.GetNamespaces().Select(ns => Pair.New(asm, ns)));
}
else
{
Log.Write("Assembly `{0}` cannot be verified. Failures:", a);