Пример #1
0
        public override List <T> Hydrate(HuskReader reader)
        {
            List <T> list = new List <T>();

            int count = reader.ReadInt();

            for (int i = 0; i < count; i++)
            {
                list.Add(husker.Hydrate(reader));
            }

            return(list);
        }
Пример #2
0
        public T ReadRecurrant <T>(Husker <T> husker)
        {
            int id = reader.ReadInt32();

            if (id < recurrant_objects.Count)
            {
                return(recurrant_objects[id].Convert <T>());
            }

            recurrant_objects.Add(null);
            T value = husker.Hydrate(this);

            recurrant_objects[id] = value;
            return(value);
        }