public ContextualOperand This() { if (Context.IsStatic) { throw new InvalidOperationException(Properties.Messages.ErrCodeStaticThis); } Type ownerType = Context.OwnerType; if (Context.OwnerType.IsValueType) { var m = Context.Member as MethodInfo; if (m != null && m.IsVirtual) { ownerType = ownerType.MakeByRefType(); } } Operand arg = new _Arg(0, ownerType); return(new ContextualOperand(arg, TypeMapper)); }
public ContextualOperand This() { if (Context.IsStatic) throw new InvalidOperationException(Properties.Messages.ErrCodeStaticThis); Type ownerType = Context.OwnerType; if (Context.OwnerType.IsValueType) { var m = Context.Member as MethodInfo; if (m != null && m.IsVirtual) ownerType = ownerType.MakeByRefType(); } Operand arg = new _Arg(0, ownerType); return new ContextualOperand(arg, TypeMapper); }