Ejemplo n.º 1
0
        public override ProjectId DecompileAssembly(LoadedAssembly assembly, ITextOutput output, DecompilationOptions options)
        {
            PEFile module = assembly.GetPEFileAsync().GetAwaiter().GetResult();
            ReadyToRunReaderCacheEntry cacheEntry = GetReader(assembly, module);

            if (cacheEntry.readyToRunReader == null)
            {
                WriteCommentLine(output, cacheEntry.failureReason);
            }
            else
            {
                ReadyToRunReader reader = cacheEntry.readyToRunReader;
                WriteCommentLine(output, reader.Machine.ToString());
                WriteCommentLine(output, reader.OperatingSystem.ToString());
                WriteCommentLine(output, reader.CompilerIdentifier);
                WriteCommentLine(output, "TODO - display more header information");
            }

            return(base.DecompileAssembly(assembly, output, options));
        }