Ejemplo n.º 1
0
 public void CopyTo(int index, MarshalArray <T> array, int arrayIndex, int count)
 {
     if (this.m_size - index < count)
     {
         ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
     }
     MarshalArrayBase.Copy(this.m_items, index, array, arrayIndex, count);
 }
Ejemplo n.º 2
0
        public MarshalList(int capacity)
        {
            if (capacity < 0)
            {
                throw new ArgumentException("CapacityStep不能小于0!");
            }

            this.m_items = new MarshalArray <T>(capacity);
        }
Ejemplo n.º 3
0
            public bool MoveNext()
            {
                MarshalArray <T> list = this.list;

                if ((uint)this.index >= (uint)list.Length)
                {
                    this.index   = this.list.Length + 1;
                    this.current = default(T);
                    return(false);
                }

                this.current = list[this.index];
                ++this.index;
                return(true);
            }
Ejemplo n.º 4
0
 internal Enumerator(MarshalArray <T> list)
 {
     this.list    = list;
     this.index   = 0;
     this.current = default(T);
 }
Ejemplo n.º 5
0
 public void CopyTo(MarshalArray <T> array, int arrayIndex)
 {
     MarshalArrayBase.Copy(this.m_items, 0, array, arrayIndex, this.m_size);
 }
Ejemplo n.º 6
0
 public void CopyTo(MarshalArray <T> array)
 {
     this.CopyTo(array, 0);
 }
Ejemplo n.º 7
0
 public MarshalList()
 {
     this.m_items = new MarshalArray <T>(4);
 }