diff --git a/ICSharpCode.Decompiler/TypeSystem/IDecompilerTypeSystem.cs b/ICSharpCode.Decompiler/TypeSystem/IDecompilerTypeSystem.cs index 5eb330c72..34e42be69 100644 --- a/ICSharpCode.Decompiler/TypeSystem/IDecompilerTypeSystem.cs +++ b/ICSharpCode.Decompiler/TypeSystem/IDecompilerTypeSystem.cs @@ -17,6 +17,7 @@ // DEALINGS IN THE SOFTWARE. using System.Reflection.Metadata; +using ICSharpCode.Decompiler.Metadata; namespace ICSharpCode.Decompiler.TypeSystem { @@ -33,6 +34,7 @@ namespace ICSharpCode.Decompiler.TypeSystem IMember ResolveAsMember(EntityHandle memberReference); MetadataReader GetMetadata(); + PEFile ModuleDefinition { get; } /// /// Gets a type system instance that automatically specializes the results diff --git a/ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs b/ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs index 25289738b..9867149d0 100644 --- a/ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs +++ b/ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs @@ -47,6 +47,8 @@ namespace ICSharpCode.Decompiler.TypeSystem get { return context.Compilation; } } + public Metadata.PEFile ModuleDefinition => context.ModuleDefinition; + public TypeParameterSubstitution Substitution { get { return substitution; } }