Ejemplo n.º 1
0
        public void Deserialize(Archive archive, BinaryReader reader)
        {
            this.archive = archive;
            Name         = reader.ReadString();
            Type         = reader.ReadInt32();
            byte[] by = new byte[16];
            reader.Read(by, 0, 16);
            PhysicalStoreDataStreamId = new Guid(by);
            int hashLen = reader.ReadByte();

            if (hashLen > 0)
            {
                DataStreamHash = reader.ReadBytes(hashLen);
            }
            else
            {
                DataStreamHash = null;
            }
            int cnt = reader.ReadInt32();

            while (cnt-- > 0)
            {
                ArchiveItem subItem = new ArchiveItem();
                ChildItems.Add(subItem);
                subItem.Deserialize(archive, reader);
            }
        }
Ejemplo n.º 2
0
 public void ReadIndex()
 {
     using (Stream stream = physicalStore.OpenStream (IndexStreamId)) {
         using (BinaryReader reader = new BinaryReader(stream)) {
             int count = reader.ReadInt32 ();
             while (count-- > 0) {
                 ArchiveItem item = new ArchiveItem ();
                 rootItems.Add (item);
                 item.Deserialize (this, reader);
             }
         }
     }
 }
Ejemplo n.º 3
0
 public void ReadIndex()
 {
     using (Stream stream = physicalStore.OpenStream(IndexStreamId)) {
         using (BinaryReader reader = new BinaryReader(stream)) {
             int count = reader.ReadInt32();
             while (count-- > 0)
             {
                 ArchiveItem item = new ArchiveItem();
                 rootItems.Add(item);
                 item.Deserialize(this, reader);
             }
         }
     }
 }
Ejemplo n.º 4
0
 public void Deserialize(Archive archive, BinaryReader reader)
 {
     this.archive = archive;
     Name = reader.ReadString ();
     Type = reader.ReadInt32 ();
     byte[] by = new byte[16];
     reader.Read (by, 0, 16);
     PhysicalStoreDataStreamId = new Guid (by);
     int hashLen = reader.ReadByte ();
     if (hashLen > 0) {
         DataStreamHash = reader.ReadBytes (hashLen);
     } else {
         DataStreamHash = null;
     }
     int cnt = reader.ReadInt32 ();
     while (cnt-- > 0) {
         ArchiveItem subItem = new ArchiveItem ();
         ChildItems.Add (subItem);
         subItem.Deserialize (archive, reader);
     }
 }