SetMemberValue() private method

private SetMemberValue ( String name, Object value ) : void
name String
value Object
return void
Ejemplo n.º 1
0
        internal override Object Evaluate()
        {
            JSObject result = this.Engine.GetOriginalObjectConstructor().ConstructObject();

            for (int i = 0, n = this.keys.Length; i < n; i++)
            {
                result.SetMemberValue(this.keys[i].Evaluate().ToString(), this.values[i].Evaluate());
            }
            return(result);
        }
        internal override object Evaluate()
        {
            JSObject obj2   = base.Engine.GetOriginalObjectConstructor().ConstructObject();
            int      index  = 0;
            int      length = this.keys.Length;

            while (index < length)
            {
                obj2.SetMemberValue(this.keys[index].Evaluate().ToString(), this.values[index].Evaluate());
                index++;
            }
            return(obj2);
        }