Inheritance: IElement, IPreservingOffset
Exemplo n.º 1
0
        public override IElement Interpret(InstructionElement instruction, IndividualDecompilationContext context)
        {
            var constructor = (ConstructorInfo)((MethodReferenceInstruction)instruction.Instruction).Method;
            var arguments = this.CaptureArguments(constructor.GetParameters(), constructor, context);

            return new ExpressionElement(Expression.New(constructor, arguments));
        }
Exemplo n.º 2
0
 protected virtual IElement VisitInstruction(InstructionElement instruction)
 {
     return(instruction);
 }
Exemplo n.º 3
0
 public override bool CanInterpret(InstructionElement instruction)
 {
     return instruction.OpCode == OpCodes.Newobj;
 }
 protected override IElement VisitInstruction(InstructionElement instruction)
 {
     this.OpCodes.Add(instruction.OpCode);
     return base.VisitInstruction(instruction);
 }