Exemplo n.º 1
0
        private static void ApplyPipeline(IDecompilationPipeline pipeline, IList<IElement> elements, IManagedMethod method)
        {
            var parameters = method.GetParameters().Select(p => Expression.Parameter(p.ParameterType, p.Name)).ToList();
            if (!method.IsStatic)
                parameters.Insert(0, Expression.Parameter(method.DeclaringType, "<this>"));

            var context = new DecompilationContext(null, method, i => parameters[i]);
            foreach (var step in pipeline.GetSteps()) {
                step.Apply(elements, context);
            }
        }
Exemplo n.º 2
0
        private static void ApplyPipeline(IDecompilationPipeline pipeline, IList <IElement> elements, IManagedMethod method)
        {
            var parameters = method.GetParameters().Select(p => Expression.Parameter(p.ParameterType, p.Name)).ToList();

            if (!method.IsStatic)
            {
                parameters.Insert(0, Expression.Parameter(method.DeclaringType, "<this>"));
            }

            var context = new DecompilationContext(null, method, i => parameters[i]);

            foreach (var step in pipeline.GetSteps())
            {
                step.Apply(elements, context);
            }
        }
Exemplo n.º 3
0
 public Decompiler(IDisassembler disassembler, IDecompilationPipeline pipeline)
 {
     this.disassembler = disassembler;
     this.pipeline     = pipeline;
 }
Exemplo n.º 4
0
 public Decompiler(IDisassembler disassembler, IDecompilationPipeline pipeline)
 {
     this.disassembler = disassembler;
     this.pipeline = pipeline;
 }