コード例 #1
0
 private BlockStatement DecompileMethod(MethodBody body, out MethodSpecificContext methodContext)
 {
     methodContext = null;
     try
     {
         stackVariable3 = new MethodSpecificContext(body);
         stackVariable5 = this.typeContext;
         if (stackVariable5 == null)
         {
             dummyVar0      = stackVariable5;
             stackVariable5 = new TypeSpecificContext(body.get_Method().get_DeclaringType());
         }
         V_1           = new DecompilationContext(stackVariable3, stackVariable5, this.language);
         V_2           = this.language.CreatePipeline(V_1);
         methodContext = V_2.Run(body, this.language).get_MethodContext();
         V_0           = V_2.get_Body();
     }
     catch (Exception exception_0)
     {
         V_3 = exception_0;
         this.get_ExceptionsWhileDecompiling().Add(body.get_Method());
         methodContext = new MethodSpecificContext(body);
         V_0           = new BlockStatement();
         V_0.AddStatement(new ExceptionStatement(V_3, body.get_Method()));
         this.OnExceptionThrown(V_3);
     }
     return(V_0);
 }
コード例 #2
0
 private void DecompileMethods()
 {
     V_0 = this.methodsToBeDecompiled.GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             this.AddVariablesToNotDeclare(V_1.get_Context(), V_1.get_CatchClause());
             V_2 = this.context.get_Language().CreateFilterMethodPipeline(V_1.get_Context());
             V_3 = V_2.Run(V_1.get_Method().get_Body(), V_1.get_Block(), this.context.get_Language());
             this.context.get_TypeContext().get_GeneratedFilterMethods().Add(new GeneratedMethod(V_1.get_Method(), V_2.get_Body(), V_3.get_MethodContext()));
             this.context.get_TypeContext().get_GeneratedMethodDefinitionToNameMap().Add(V_1.get_Method(), V_1.get_Method().get_Name());
             this.FixVariablesNames(V_3, V_1.get_CatchClause());
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }