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);
        }
Exemplo n.º 3
0
		public VariableReference (EvaluationContext ctx, CorValRef var, string name, DC.ObjectValueFlags flags)
			: base (ctx)
		{
			this.flags = flags;
			this.var = var;
			this.name = name;
		}
Exemplo n.º 4
0
 public VariableReference(EvaluationContext ctx, CorValRef var, string name, DC.ObjectValueFlags flags)
     : base(ctx)
 {
     this.flags = flags;
     this.var   = var;
     this.name  = name;
 }
Exemplo n.º 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;
			};
		}
Exemplo n.º 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);
            };
        }
Exemplo n.º 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;
			};
		}
Exemplo n.º 8
0
 public FieldReference(EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field)
     : this(ctx, thisobj, type, field, null, ObjectValueFlags.Field)
 {
 }
Exemplo n.º 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)
 {
 }
Exemplo n.º 12
0
 public StringAdaptor(EvaluationContext ctx, CorValRef obj, CorStringValue str)
 {
     this.ctx = (CorEvaluationContext)ctx;
     this.str = str;
     this.obj = obj;
 }
Exemplo n.º 13
0
		public FieldReference (EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field)
			: this (ctx, thisobj, type, field, null, ObjectValueFlags.Field)
		{
		}
Exemplo n.º 14
0
		public StringAdaptor (EvaluationContext ctx, CorValRef obj, CorStringValue str)
		{
			this.ctx = (CorEvaluationContext) ctx;
			this.str = str;
			this.obj = obj;
		}
Exemplo n.º 15
0
		public ArrayAdaptor (EvaluationContext ctx, CorValRef obj, CorArrayValue array)
		{
			this.ctx = (CorEvaluationContext) ctx;
			this.array = array;
			this.obj = obj;
		}