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)); }
protected virtual IElement VisitInstruction(InstructionElement instruction) { return(instruction); }
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); }