public PropertyReference(EvaluationContext ctx, PropertyInfo prop, CorValRef thisobj, CorApi.Portable.Type declaringType, CorValRef[] index)
            : base(ctx)
        {
            this.prop          = prop;
            this.declaringType = declaringType;
            if (declaringType.CorType == CorApi.Portable.CorElementType.ElementTypeArray ||
                declaringType.CorType == CorApi.Portable.CorElementType.ElementTypeSzarray)
            {
                this.module = ((CorApi.Portable.Type)((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 void SetElement(int[] indices, object val)
        {
            CorValRef it = (CorValRef)GetElement(indices);

            valRef.Invalidate();
            it.SetValue(ctx, (CorValRef)val);
        }
示例#3
0
		public VariableReference (EvaluationContext ctx, CorValRef var, string name, DC.ObjectValueFlags flags)
			: base (ctx)
		{
			this.flags = flags;
			this.var = var;
			this.name = name;
		}
 public VariableReference(EvaluationContext ctx, CorValRef var, string name, DC.ObjectValueFlags flags)
     : base(ctx)
 {
     this.flags = flags;
     this.var   = var;
     this.name  = name;
 }
示例#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 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);
            };
        }
示例#7
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;
			};
		}
示例#8
0
 public FieldReference(EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field)
     : this(ctx, thisobj, type, field, null, ObjectValueFlags.Field)
 {
 }
示例#9
0
		public PropertyReference (EvaluationContext ctx, PropertyInfo prop, CorValRef thisobj, CorType declaringType)
			: this (ctx, prop, thisobj, declaringType, null)
		{
		}
 public ArrayAdaptor(EvaluationContext ctx, CorValRef <CorApi.Portable.ArrayValue> valRef)
 {
     this.ctx    = (CorEvaluationContext)ctx;
     this.valRef = valRef;
 }
 public PropertyReference(EvaluationContext ctx, PropertyInfo prop, CorValRef thisobj, CorApi.Portable.Type declaringType)
     : this(ctx, prop, thisobj, declaringType, null)
 {
 }
示例#12
0
 public StringAdaptor(EvaluationContext ctx, CorValRef obj, CorStringValue str)
 {
     this.ctx = (CorEvaluationContext)ctx;
     this.str = str;
     this.obj = obj;
 }
示例#13
0
		public FieldReference (EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field)
			: this (ctx, thisobj, type, field, null, ObjectValueFlags.Field)
		{
		}
示例#14
0
		public StringAdaptor (EvaluationContext ctx, CorValRef obj, CorStringValue str)
		{
			this.ctx = (CorEvaluationContext) ctx;
			this.str = str;
			this.obj = obj;
		}
示例#15
0
		public ArrayAdaptor (EvaluationContext ctx, CorValRef obj, CorArrayValue array)
		{
			this.ctx = (CorEvaluationContext) ctx;
			this.array = array;
			this.obj = obj;
		}