Beispiel #1
0
        public IEnumerator <KeyValuePair <TKey, TValue> > GetEnumerator()
        {
            var array = new JsArray();             //TODO:

            foreach (var hashKey in this._table)
            {
                array.push(new KeyValuePair <TKey, TValue>(this._keys[hashKey].As <TKey>(), this._table[hashKey].As <TValue>()));
            }
            return(array.As <JsExtendedArray>().GetEnumerator().As <IEnumerator <KeyValuePair <TKey, TValue> > >());
        }
Beispiel #2
0
        JsImplConstructorInfo[] GetConstructors()
        {
            VerifyConstructors();
            var arr = new JsArray();

            for (var i = 0; i < _Constructors.length; i++)
            {
                arr.push(_Constructors[i]);
            }
            return(arr.As <JsImplConstructorInfo[]>());
        }
Beispiel #3
0
        public JsImplMethodInfo[] GetMethods()
        {
            VerifyMethods();
            var arr = new JsArray();

            for (var i = 0; i < _Methods.length; i++)
            {
                arr.push(_Methods[i]);
            }
            return(arr.As <JsImplMethodInfo[]>());
        }
Beispiel #4
0
 public JsImplMethodInfo[] GetMethods()
 {
     VerifyMethods();
     var arr = new JsArray();
     for (var i = 0; i < _Methods.length; i++)
     {
         arr.push(_Methods[i]);
     }
     return arr.As<JsImplMethodInfo[]>();
 }
Beispiel #5
0
 //[JsMethod(Name = "")] //HACK! TODO: FIX!
 public static void Sort(JsArray array, IComparer cmp)
 {
     Sort(array.As <object[]>(), cmp.As <IComparer <object> >());
 }