GetValueAtIndex() private method

private GetValueAtIndex ( uint index ) : Object
index uint
return Object
コード例 #1
0
        internal virtual void Concat(ArrayObject source)
        {
            uint len = source.len;

            if (len != 0)
            {
                uint num2 = this.len;
                this.SetLength(num2 + len);
                uint denseArrayLength = len;
                if (!(source is ArrayWrapper) && (len > source.denseArrayLength))
                {
                    denseArrayLength = source.denseArrayLength;
                }
                uint num4 = num2;
                for (uint i = 0; i < denseArrayLength; i++)
                {
                    this.SetValueAtIndex(num4++, source.GetValueAtIndex(i));
                }
                if (denseArrayLength != len)
                {
                    IDictionaryEnumerator enumerator = source.NameTable.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        long num6 = Array_index_for(enumerator.Key.ToString());
                        if (num6 >= 0L)
                        {
                            this.SetValueAtIndex(num2 + ((uint)num6), ((JSField)enumerator.Value).GetValue(null));
                        }
                    }
                }
            }
        }
コード例 #2
0
        internal virtual void Concat(ArrayObject source)
        {
            uint sourceLength = source.len;

            if (sourceLength == 0)
            {
                return;
            }
            uint oldLength = this.len;

            this.SetLength(oldLength + (ulong)sourceLength);
            uint slen = sourceLength;

            if (!(source is ArrayWrapper) && sourceLength > source.denseArrayLength)
            {
                slen = source.denseArrayLength;
            }
            uint j = oldLength;

            for (uint i = 0; i < slen; i++)
            {
                this.SetValueAtIndex(j++, source.GetValueAtIndex(i));
            }
            if (slen == sourceLength)
            {
                return;
            }
            //Iterate over the sparse indices of source
            IDictionaryEnumerator e = source.NameTable.GetEnumerator();

            while (e.MoveNext())
            {
                long i = ArrayObject.Array_index_for(e.Key.ToString());
                if (i >= 0)
                {
                    this.SetValueAtIndex(oldLength + (uint)i, ((JSField)e.Value).GetValue(null));
                }
            }
        }
コード例 #3
0
 internal virtual void Concat(ArrayObject source){
   uint sourceLength = source.len;
   if (sourceLength == 0)
     return;
   uint oldLength = this.len;
   this.SetLength(oldLength + (ulong)sourceLength);
   uint slen = sourceLength;
   if (!(source is ArrayWrapper) && sourceLength > source.denseArrayLength) 
     slen = source.denseArrayLength;
   uint j = oldLength;
   for (uint i = 0; i < slen; i++)
     this.SetValueAtIndex(j++, source.GetValueAtIndex(i));
   if (slen == sourceLength) return;
   //Iterate over the sparse indices of source
   IDictionaryEnumerator e = source.NameTable.GetEnumerator();
   while (e.MoveNext()){
     long i = ArrayObject.Array_index_for(e.Key.ToString());
     if (i >= 0)
       this.SetValueAtIndex(oldLength+(uint)i, ((JSField)e.Value).GetValue(null));
   }
 }
コード例 #4
0
 internal virtual void Concat(ArrayObject source)
 {
     uint len = source.len;
     if (len != 0)
     {
         uint num2 = this.len;
         this.SetLength(num2 + len);
         uint denseArrayLength = len;
         if (!(source is ArrayWrapper) && (len > source.denseArrayLength))
         {
             denseArrayLength = source.denseArrayLength;
         }
         uint num4 = num2;
         for (uint i = 0; i < denseArrayLength; i++)
         {
             this.SetValueAtIndex(num4++, source.GetValueAtIndex(i));
         }
         if (denseArrayLength != len)
         {
             IDictionaryEnumerator enumerator = source.NameTable.GetEnumerator();
             while (enumerator.MoveNext())
             {
                 long num6 = Array_index_for(enumerator.Key.ToString());
                 if (num6 >= 0L)
                 {
                     this.SetValueAtIndex(num2 + ((uint) num6), ((JSField) enumerator.Value).GetValue(null));
                 }
             }
         }
     }
 }