public void IntOperandEmitSucceeds() { var unaryInstruction = new UnaryInstruction(OpCodes.Ldc_I4_S, 10); unaryInstruction.Emit(_ilGenerator); }
public void ConstructorInfoOperandEmitSucceeds() { var unaryInstruction = new UnaryInstruction(OpCodes.Newobj, typeof(Customer).GetConstructor(Type.EmptyTypes)); unaryInstruction.Emit(_ilGenerator); }
public void TypeOperandEmitSucceeds() { var unaryInstruction = new UnaryInstruction(OpCodes.Ldobj, typeof(Customer2)); unaryInstruction.Emit(_ilGenerator); }
public void FieldInfoOperandEmitSucceeds() { var unaryInstruction = new UnaryInstruction(OpCodes.Ldfld, typeof(Customer2).GetField(nameof(Customer2.GivenName))); unaryInstruction.Emit(_ilGenerator); }
public void MethodInfoOperandEmitSucceeds() { var unaryInstruction = new UnaryInstruction(OpCodes.Callvirt, typeof(Customer2).GetProperty(nameof(Customer2.Age)).GetSetMethod()); unaryInstruction.Emit(_ilGenerator); }