示例#1
0
        public PropertyReference(EvaluationContext ctx, PropertyInfo prop, CorValRef thisobj, CorType declaringType, CorValRef[] index)
            : base(ctx)
        {
            this.prop          = prop;
            this.declaringType = declaringType;
            if (declaringType.Type == CorElementType.ELEMENT_TYPE_ARRAY ||
                declaringType.Type == CorElementType.ELEMENT_TYPE_SZARRAY)
            {
                this.module = ((CorType)((CorEvaluationContext)ctx).Adapter.GetType(ctx, "System.Object")).Class.Module;
            }
            else
            {
                this.module = declaringType.Class.Module;
            }
            this.index = index;
            if (!prop.GetGetMethod(true).IsStatic)
            {
                this.thisobj = thisobj;
            }

            flags = GetFlags(prop);

            loader = delegate {
                return(((CorValRef)Value).Val);
            };
        }
示例#2
0
		public FieldReference (EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field)
			: base (ctx)
		{
			this.thisobj = thisobj;
			this.type = type;
			this.field = field;
			if (!field.IsStatic)
				this.thisobj = thisobj;

			loader = delegate {
				return ((CorValRef)Value).Val;
			};
		}
		public PropertyReference (EvaluationContext ctx, PropertyInfo prop, CorValRef thisobj, CorType declaringType, CorValRef[] index)
			: base (ctx)
		{
			this.prop = prop;
			this.declaringType = declaringType;
			this.module = declaringType.Class.Module;
			this.index = index;
			if (!prop.GetGetMethod (true).IsStatic)
				this.thisobj = thisobj;

			loader = delegate {
				return ((CorValRef)Value).Val;
			};
		}
示例#4
0
        public FieldReference(EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field)
            : base(ctx)
        {
            this.thisobj = thisobj;
            this.type    = type;
            this.field   = field;
            if (field.IsStatic)
            {
                this.thisobj = null;
            }

            loader = delegate {
                return(((CorValRef)Value).Val);
            };
        }
示例#5
0
		public FieldReference (EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field, string vname, ObjectValueFlags vflags) : base (ctx)
		{
			this.thisobj = thisobj;
			this.type = type;
			this.field = field;
			this.vname = vname;
			if (field.IsStatic)
				this.thisobj = null;

			flags = vflags | GetFlags (field);

			loader = delegate {
				return ((CorValRef)Value).Val;
			};
		}
示例#6
0
        public PropertyReference(EvaluationContext ctx, PropertyInfo prop, CorValRef thisobj, CorType declaringType, CorValRef[] index)
            : base(ctx)
        {
            this.prop          = prop;
            this.declaringType = declaringType;
            this.module        = declaringType.Class.Module;
            this.index         = index;
            if (!prop.GetGetMethod(true).IsStatic)
            {
                this.thisobj = thisobj;
            }

            loader = delegate {
                return(((CorValRef)Value).Val);
            };
        }
示例#7
0
        public FieldReference(EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field, string vname, ObjectValueFlags vflags) : base(ctx)
        {
            this.thisobj = thisobj;
            this.type    = type;
            this.field   = field;
            this.vname   = vname;
            if (field.IsStatic)
            {
                this.thisobj = null;
            }

            flags = vflags | GetFlags(field);

            loader = delegate {
                return(((CorValRef)Value).Val);
            };
        }
示例#8
0
        public PropertyValueReference(EvaluationContext ctx, PropertyDefinition prop, CorValRef thisobj, CorDebugType declaringType, CorValRef[] index)
            : base(ctx)
        {
            this.prop          = prop;
            this.declaringType = declaringType;
            this.module        = declaringType.Class.Assembly;
            this.index         = index;
            if (!prop.GetMethod.IsStatic)
            {
                this.thisobj = thisobj;
            }

            flags = GetFlags(prop);

            loader = delegate {
                return(((CorValRef)Value).Val);
            };
        }
示例#9
0
		public PropertyReference (EvaluationContext ctx, PropertyInfo prop, CorValRef thisobj, CorType declaringType, CorValRef[] index)
			: base (ctx)
		{
			this.prop = prop;
			this.declaringType = declaringType;
			if (declaringType.Type == CorElementType.ELEMENT_TYPE_ARRAY ||
			    declaringType.Type == CorElementType.ELEMENT_TYPE_SZARRAY) {
				this.module = ((CorType)((CorEvaluationContext)ctx).Adapter.GetType (ctx, "System.Object")).Class.Module;
			} else {
				this.module = declaringType.Class.Module;
			}
			this.index = index;
			if (!prop.GetGetMethod (true).IsStatic)
				this.thisobj = thisobj;

			flags = GetFlags (prop);

			loader = delegate {
				return ((CorValRef)Value).Val;
			};
		}
		public PropertyValueReference (EvaluationContext ctx, PropertyDefinition prop, CorValRef thisobj, CorDebugType declaringType, CorValRef[] index)
				: base (ctx)
		{
			this.prop = prop;
			this.declaringType = declaringType;
			this.module = declaringType.Class.Assembly;
			this.index = index;
			if (!prop.GetMethod.IsStatic)
				this.thisobj = thisobj;
	
			flags = GetFlags (prop);
	
			loader = delegate {
				return ((CorValRef)Value).Val;
			};
		}