Exemplo n.º 1
0
        public CodeViewData Run(IDnlibDef item, CancellationToken token)
        {
            var builder = CreateBuilder(item, token);

            if (builder == null)
            {
                return(new CodeViewData(""));
            }
            builder.RunTransformations();
            var output = new CodeViewOutput();

            builder.GenerateCode(output);
            return(output.GetResult());
        }
Exemplo n.º 2
0
 public CodeViewData Run(IDnlibDef item, CancellationToken token)
 {
     try {
         var output       = new CodeViewOutput();
         var disassembler = new ReflectionDisassembler(output, true, token);
         DoDisassemble(item, output, disassembler);
         return(output.GetResult());
     }
     catch {
         // Retry if ILStructure failed.
         var output = new CodeViewOutput();
         output.WriteComment("// ILStructure failed!");
         output.WriteLine();
         var disassembler = new ReflectionDisassembler(output, false, token);
         DoDisassemble(item, output, disassembler);
         return(output.GetResult());
     }
 }