private void DecompileMethods() { foreach (FilterMethodToBeDecompiled method in methodsToBeDecompiled) { AddVariablesToNotDeclare(method.Context, method.CatchClause); BlockDecompilationPipeline pipeline = Language.CreateFilterMethodPipeline(method.Method, method.Context); DecompilationContext innerContext = pipeline.Run(method.Method.Body, method.Block, Language); this.context.TypeContext.GeneratedFilterMethods.Add(new GeneratedMethod(method.Method, pipeline.Body, innerContext.MethodContext)); this.context.TypeContext.GeneratedMethodDefinitionToNameMap.Add(method.Method, method.Method.Name); // The following line must be here, after the decompilation, because it uses the renamed nameless parameters. FixVariablesNames(innerContext, method.CatchClause); } }
// This pipeline is used by the PropertyDecompiler to finish the decompilation of properties, which are partially decompiled // using the steps from the IntermediateRepresenationPipeline. public virtual BlockDecompilationPipeline CreatePropertyPipeline(DecompilationContext context) { BlockDecompilationPipeline result = new BlockDecompilationPipeline(LanguageDecompilationSteps(false), context); return(result); }
// This pipeline is used by the PropertyDecompiler to finish the decompilation of properties, which are partially decompiled // using the steps from the IntermediateRepresenationPipeline. public virtual BlockDecompilationPipeline CreatePropertyPipeline(MethodDefinition method, DecompilationContext context) { BlockDecompilationPipeline result = new BlockDecompilationPipeline(new IDecompilationStep[0], context); return(result); }