void LoadModule(ModuleDescription module, ArrayList asmList)
{
// Load the assemblies
foreach (string s in module.Assemblies) {
Assembly asm = null;
// don't load the assembly if it's already loaded
string asmPath = Path.Combine (baseDirectory, s);
foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies ()) {
// Sorry, you can't load addins from
// dynamic assemblies as get_Location
// throws a NotSupportedException
if (a is System.Reflection.Emit.AssemblyBuilder) {
continue;
}
if (a.Location == asmPath) {
asm = a;
break;
}
}
if (asm == null) {
asm = Assembly.LoadFrom (asmPath);
}
asmList.Add (asm);
}
}