public override void Decompile(Language language, ITextOutput output, DecompilationOptions options)
		{
			assembly.WaitUntilLoaded(); // necessary so that load errors are passed on to the caller
			language.DecompileAssembly(assembly, output, options);
		}
Beispiel #2
0
 public override void Decompile(Language language, ITextOutput output, DecompilationOptions options)
 {
     try {
         assembly.WaitUntilLoaded(); // necessary so that load errors are passed on to the caller
     } catch (AggregateException ex) {
         language.WriteCommentLine(output, assembly.FileName);
         if (ex.InnerException is BadImageFormatException) {
             language.WriteCommentLine(output, "This file does not contain a managed assembly.");
             return;
         } else {
             throw;
         }
     }
     language.DecompileAssembly(assembly, output, options);
 }
Beispiel #3
0
 public override void Decompile(Language language, ITextOutput output, DecompilationOptions options)
 {
     try {
         assembly.WaitUntilLoaded(); // necessary so that load errors are passed on to the caller
     } catch (AggregateException ex) {
         language.WriteCommentLine(output, assembly.FileName);
         if (ex.InnerException is BadImageFormatException || ex.InnerException is IOException) {
             language.WriteCommentLine(output, "This file does not contain a managed assembly.");
             return;
         } else {
             throw;
         }
     }
     var flags = Parent is AssemblyTreeNode ? DecompileAssemblyFlags.Module : DecompileAssemblyFlags.Assembly;
     if (assembly.AssemblyDefinition == null)
         flags = DecompileAssemblyFlags.Module;
     if (options.FullDecompilation)
         flags = DecompileAssemblyFlags.AssemblyAndModule;
     language.DecompileAssembly(assembly, output, options, flags);
 }
Beispiel #4
0
		public override void Decompile(Language language, ITextOutput output, DecompilationOptions options) {
			if (dnSpyFile.ModuleDef == null) {
				language.WriteCommentLine(output, "This file does not contain a managed assembly.");
				return;
			}
			var flags = Parent is AssemblyTreeNode ? DecompileAssemblyFlags.Module : DecompileAssemblyFlags.Assembly;
			if (dnSpyFile.AssemblyDef == null)
				flags = DecompileAssemblyFlags.Module;
			if (options.FullDecompilation)
				flags = DecompileAssemblyFlags.AssemblyAndModule;
			language.DecompileAssembly(DnSpyFileList, dnSpyFile, output, options, flags);
		}