Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbevain <jbevain@gmail.com>2011-05-20 23:35:02 +0400
committerjbevain <jbevain@gmail.com>2011-05-20 23:35:02 +0400
commit154357af16659bc52750b42b72ff1444c01973df (patch)
tree6d57c6cd63b464c98dafb507b4d37ce0aa2940e0 /Mono.Cecil
parent96e996076d2a97cc3565cb40048b576dc777591d (diff)
Create a modulref for types scoped on a file
Diffstat (limited to 'Mono.Cecil')
-rw-r--r--Mono.Cecil/AssemblyReader.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Mono.Cecil/AssemblyReader.cs b/Mono.Cecil/AssemblyReader.cs
index b53a810..fd62622 100644
--- a/Mono.Cecil/AssemblyReader.cs
+++ b/Mono.Cecil/AssemblyReader.cs
@@ -2574,10 +2574,8 @@ namespace Mono.Cecil {
scope = metadata.AssemblyReferences [(int) token.RID - 1];
break;
case TokenType.File:
+ InitializeModuleReferences ();
scope = GetModuleReferenceFromFile (token);
- if (scope == null)
- throw new NotSupportedException ();
-
break;
default:
throw new NotSupportedException ();
@@ -2606,6 +2604,11 @@ namespace Mono.Cecil {
break;
}
+ if (reference == null) {
+ reference = new ModuleReference (file_name);
+ modules.Add (reference);
+ }
+
return reference;
}