From 94ed966b9cb3f753359e3220b6c61101f86f5202 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 6 Jun 2016 00:23:28 +0900 Subject: [PATCH] fix #605 - Missing namespace when 2+ classes with the same name exist in the same assembly --- ILSpy/Languages/CSharpLanguage.cs | 2 +- ILSpy/VB/VBLanguage.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ILSpy/Languages/CSharpLanguage.cs b/ILSpy/Languages/CSharpLanguage.cs index 85235cb96..024996790 100644 --- a/ILSpy/Languages/CSharpLanguage.cs +++ b/ILSpy/Languages/CSharpLanguage.cs @@ -201,7 +201,7 @@ namespace ICSharpCode.ILSpy public override void DecompileType(TypeDefinition type, ITextOutput output, DecompilationOptions options) { - AstBuilder codeDomBuilder = CreateAstBuilder(options, currentType: type); + AstBuilder codeDomBuilder = CreateAstBuilder(options, currentModule: type.Module); codeDomBuilder.AddType(type); RunTransformsAndGenerateCode(codeDomBuilder, output, options); } diff --git a/ILSpy/VB/VBLanguage.cs b/ILSpy/VB/VBLanguage.cs index c98d329f0..949b369cc 100644 --- a/ILSpy/VB/VBLanguage.cs +++ b/ILSpy/VB/VBLanguage.cs @@ -351,7 +351,7 @@ namespace ICSharpCode.ILSpy.VB public override void DecompileType(TypeDefinition type, ITextOutput output, DecompilationOptions options) { - AstBuilder codeDomBuilder = CreateAstBuilder(options, currentType: type); + AstBuilder codeDomBuilder = CreateAstBuilder(options, currentModule: type.Module); codeDomBuilder.AddType(type); RunTransformsAndGenerateCode(codeDomBuilder, output, options, type.Module); }