Permalink
Browse files

Don't add assemblies to the name cache when we didn't explicitly reso…

…lve them by that name. This allows having an AssemblyBuilder and an Assembly with the same identity and that can be helpful for circular ref scenarios.
  • Loading branch information...
1 parent 8fcb833 commit 1c48541d81de643de826dcfd1efd62bbc0c2ef51 jfrijters committed Jun 18, 2010
Showing with 0 additions and 3 deletions.
  1. +0 −3 reflect/Universe.cs
View
3 reflect/Universe.cs
@@ -525,7 +525,6 @@ public Assembly LoadAssembly(RawModule module)
{
asm = module.ToAssembly();
assemblies.Add(asm);
- assembliesByName.Add(refname, asm);
}
return asm;
}
@@ -706,7 +705,6 @@ public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderA
private AssemblyBuilder DefineDynamicAssemblyImpl(AssemblyName name, AssemblyBuilderAccess access, string dir, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions)
{
AssemblyBuilder asm = new AssemblyBuilder(this, name, dir, requiredPermissions, optionalPermissions, refusedPermissions);
- assembliesByName.Add(asm.FullName, asm);
assemblies.Add(asm);
return asm;
}
@@ -725,7 +723,6 @@ internal void RenameAssembly(Assembly assembly, AssemblyName oldName)
{
assembliesByName.Remove(key);
}
- assembliesByName.Add(assembly.FullName, assembly);
}
public void Dispose()

0 comments on commit 1c48541

Please sign in to comment.