Inheritance: IElement, IPreservingOffset
示例#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));
        }
示例#2
0
 protected virtual IElement VisitInstruction(InstructionElement instruction)
 {
     return(instruction);
 }
示例#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);
 }