Ejemplo n.º 1
0
 public override void SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo locale)
 {
     if (obj is StackFrame)
     {
         this.SetValue(((StackFrame)obj).closureInstance, value, invokeAttr, binder, locale, (StackFrame)obj);
     }
     else if (obj is ScriptObject)
     {
         this.SetValue(obj, value, invokeAttr, binder, locale, (ScriptObject)obj);
     }
     else
     {
         this.SetValue(obj, value, invokeAttr, binder, locale, null);
     }
 }
Ejemplo n.º 2
0
 public override void SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo locale)
 {
     this.wrappedProperty.SetValue(this.wrappedObject, value, invokeAttr, binder, new Object[0], locale);
 }
Ejemplo n.º 3
0
 public override void SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo locale)
 {
     this.value = value;
 }
Ejemplo n.º 4
0
        internal override Object Invoke(Object obj, Object thisob, BindingFlags options, Binder binder, Object[] parameters, CultureInfo culture)
        {
            bool   construct = (options & BindingFlags.CreateInstance) != 0;
            bool   brackets  = (options & BindingFlags.GetProperty) != 0 && (options & BindingFlags.InvokeMethod) == 0;
            Object f         = this.func;

            if (f == null)
            {
                f = this.field.GetValue(this.obj);
            }
            FunctionObject func = f as FunctionObject;
            JSObject       jsOb = obj as JSObject;

            if (jsOb != null && func != null && func.isMethod && (func.attributes & MethodAttributes.Virtual) != 0 &&
                jsOb.GetParent() != func.enclosing_scope && ((ClassScope)func.enclosing_scope).HasInstance(jsOb))
            {
                LateBinding lb = new LateBinding(func.name);
                lb.obj = jsOb;
                return(lb.Call(parameters, construct, brackets, ((ScriptObject)this.obj).engine));
            }
            return(LateBinding.CallValue(f, parameters, construct, brackets, ((ScriptObject)this.obj).engine, thisob, binder, culture, null));
        }
Ejemplo n.º 5
0
 public override Object Invoke(BindingFlags options, Binder binder, Object[] parameters, CultureInfo culture)
 {
     return(LateBinding.CallValue(this.cons, parameters, true, false, this.cons.engine, null, binder, culture, null));
 }
Ejemplo n.º 6
0
 public override Object Invoke(Object obj, BindingFlags options, Binder binder, Object[] parameters, CultureInfo culture)
 {
     return(this.cons.Call(parameters, obj, binder, culture));
 }
Ejemplo n.º 7
0
 public override void SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
 {
     this.property.SetValue(this.obj, value, invokeAttr, binder, index, culture);
 }
Ejemplo n.º 8
0
 public override Object GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
 {
     return(this.property.GetValue(this.obj, invokeAttr, binder, index, culture));
 }
 internal override object Invoke(object obj, object thisob, BindingFlags options, Binder binder, object[] parameters, CultureInfo culture)
 {
     return(this.Invoke(thisob, options, binder, parameters, culture));
 }
 public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
 {
     return(this._comObject.Call(invokeAttr, binder, (parameters != null) ? parameters : new object[0], culture));
 }
Ejemplo n.º 11
0
 public override void SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo locale)
 {
     if (obj is StackFrame)
     {
         this.field.SetValue(((StackFrame)((StackFrame)obj).engine.ScriptObjectStackTop()).closureInstance, value, invokeAttr, binder, locale);
         return;
     }
     throw new JScriptException(JSError.InternalError); //should never happen
 }