示例#1
0
 public BlockStatement Process(DecompilationContext context, BlockStatement body)
 {
     V_0 = context.get_MethodContext().get_Method();
     if (V_0.get_IsGetter() || V_0.get_IsSetter())
     {
         if (!context.get_TypeContext().get_MethodToPropertyMap().TryGetValue(V_0, out V_1))
         {
             throw new Exception("PropertyDefinition not found in method to property map.");
         }
         if (V_1.ShouldStaySplit())
         {
             V_2 = String.Concat("JustDecompileGenerated_", V_0.get_Name());
             context.get_TypeContext().get_MethodDefinitionToNameMap().Add(V_0, V_2);
             V_3 = Utilities.GetCompileGeneratedBackingField(V_1);
             if (V_3 != null)
             {
                 V_4 = V_3.get_Name().Replace(String.Concat("<", V_1.get_Name(), ">"), String.Concat("JustDecompileGenerated_", V_1.get_Name(), "_"));
                 if (!context.get_TypeContext().get_BackingFieldToNameMap().ContainsKey(V_3))
                 {
                     context.get_TypeContext().get_BackingFieldToNameMap().Add(V_3, V_4);
                 }
             }
         }
     }
     return(body);
 }
 public InitializationPattern(CodePatternsContext patternsContext, DecompilationContext context)
 {
     base(patternsContext, context.get_MethodContext().get_Method().get_Module().get_TypeSystem());
     this.typeContext = context.get_TypeContext();
     this.method      = context.get_MethodContext().get_Method();
     return;
 }
 public virtual BlockStatement Process(DecompilationContext context, BlockStatement block)
 {
     this.context       = context;
     this.methodContext = context.get_MethodContext();
     this.typeContext   = context.get_TypeContext();
     this.Preprocess();
     this.VisitBlockStatement(block);
     this.ReplaceDeclarations(block);
     this.CollectVariableNames();
     return(block);
 }
示例#4
0
 public BlockStatement Process(DecompilationContext context, BlockStatement body)
 {
     this.context            = context;
     V_0                     = context.get_MethodContext().get_Method().get_Module().get_TypeSystem();
     this.operatorStep       = new OperatorStep(this, V_0);
     this.removePIDStep      = new RemovePrivateImplementationDetailsStep(V_0);
     this.rebuildEventsStep  = new RebuildEventsStep(V_0);
     this.propertyRecognizer = new PropertyRecognizer(V_0, context.get_TypeContext(), context.get_Language());
     this.rebuildAnonymousInitializersStep = new RebuildAnonymousTypesInitializersStep(this, V_0);
     this.fixSwitchConditionStep           = new FixSwitchConditionStep(context);
     this.replaceThisWithBaseStep          = new HandleVirtualMethodInvocations(this.context.get_MethodContext().get_Method());
     return((BlockStatement)this.VisitBlockStatement(body));
 }
 public BlockStatement Process(DecompilationContext context, BlockStatement body)
 {
     V_0 = new DependsOnAnalysisVisitor(context.get_MethodContext().get_AnalysisResults().get_TypesDependingOn(), context.get_MethodContext().get_AnalysisResults().get_AmbiguousCastsToObject());
     V_0.Visit(body);
     if (context.get_TypeContext().get_AssignmentData() != null)
     {
         V_1 = context.get_TypeContext().get_AssignmentData().get_Values().GetEnumerator();
         try
         {
             while (V_1.MoveNext())
             {
                 V_2 = V_1.get_Current();
                 V_0.Visit(V_2.get_AssignmentExpression());
             }
         }
         finally
         {
             ((IDisposable)V_1).Dispose();
         }
     }
     return(body);
 }
			V_0 = this.GetHandlePropertyGetterReference(Type.GetTypeFromHandle(// 
			// Current member / type: Telerik.JustDecompiler.Ast.Expressions.Expression Telerik.JustDecompiler.Steps.TransformMemberHandlersStep::GetTypeHandleExpression(Mono.Cecil.TypeReference,System.Collections.Generic.IEnumerable`1<Mono.Cecil.Cil.Instruction>)
			// Exception in: Telerik.JustDecompiler.Ast.Expressions.Expression GetTypeHandleExpression(Mono.Cecil.TypeReference,System.Collections.Generic.IEnumerable<Mono.Cecil.Cil.Instruction>)
			// Specified method is not supported.
			// 
			// mailto: [email protected]


		public BlockStatement Process(DecompilationContext context, BlockStatement body)
		{
			this.context = context;
			this.typeSystem = context.get_TypeContext().get_CurrentType().get_Module().get_TypeSystem();
			return (BlockStatement)this.Visit(body);
		}