Exemple #1
0
        public void GetFrom(IByteStream stream)
        {
            if (!IsNull)
            {
                Dispose();
            }
            ushort count = stream.GetUShort();

            for (int i = 0; i < count; i++)
            {
                T item = new T();
                item.GetFrom(stream);
                list.Add(item);
            }
        }
Exemple #2
0
        public void GetFrom(IByteStream stream)
        {
            if (!stream.HasMore())
            {
                return;
            }
            ushort count = stream.GetUShort();

            array = new T[count];
            //if (count == 0) return;
            //if (array != null)
            //{
            //    Dispose();
            //}
            //array = Take(count);
            for (int i = 0; i < count; i++)
            {
                T item = new T();
                item.GetFrom(stream);
                array[i] = item;
            }
        }