diff options
author | jfrijters <jfrijters> | 2011-01-13 13:44:44 +0300 |
---|---|---|
committer | jfrijters <jfrijters> | 2011-01-13 13:44:44 +0300 |
commit | 4de90713f86a263c4c51b6aa4ca8b650b98e6455 (patch) | |
tree | eefa17743f6b23027188094c01f3694ea6d21ca9 /reflect/Reader | |
parent | 7f1f16f7cc65883e046220e03d417037e037d0db (diff) |
Added support for magic missing assemblies that resolve missing types to allow (some) reflection on assemblies with missing dependencies.
Diffstat (limited to 'reflect/Reader')
-rw-r--r-- | reflect/Reader/ModuleReader.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/reflect/Reader/ModuleReader.cs b/reflect/Reader/ModuleReader.cs index 16822684..87f38e62 100644 --- a/reflect/Reader/ModuleReader.cs +++ b/reflect/Reader/ModuleReader.cs @@ -362,10 +362,10 @@ namespace IKVM.Reflection.Reader case AssemblyRefTable.Index: { Assembly assembly = ResolveAssemblyRef((scope & 0xFFFFFF) - 1); - string typeName = GetTypeName(TypeRef.records[index].TypeNameSpace, TypeRef.records[index].TypeName); - Type type = assembly.GetType(TypeNameParser.Escape(typeName)); + Type type = assembly.ResolveType(GetString(TypeRef.records[index].TypeNameSpace), GetString(TypeRef.records[index].TypeName)); if (type == null) { + string typeName = GetTypeName(TypeRef.records[index].TypeNameSpace, TypeRef.records[index].TypeName); throw new TypeLoadException(String.Format("Type '{0}' not found in assembly '{1}'", typeName, assembly.FullName)); } typeRefs[index] = type; @@ -374,8 +374,7 @@ namespace IKVM.Reflection.Reader case TypeRefTable.Index: { Type outer = ResolveType(scope, null); - string typeName = GetTypeName(TypeRef.records[index].TypeNameSpace, TypeRef.records[index].TypeName); - typeRefs[index] = outer.GetNestedTypeCorrectly(typeName); + typeRefs[index] = outer.ResolveNestedType(GetString(TypeRef.records[index].TypeNameSpace), GetString(TypeRef.records[index].TypeName)); break; } case ModuleTable.Index: |