Beispiel #1
0
 void ReadIndex()
 {
     index = new Dictionary <Guid, DictionaryItem> ();
     if (multiStream.Exists(indexStreamId))
     {
         using (BinaryReader reader = new BinaryReader(multiStream.OpenStream(indexStreamId))) {
             int cnt = reader.ReadInt32();
             while (cnt-- > 0)
             {
                 DictionaryItem item = new DictionaryItem();
                 item.StreamId = new Guid(reader.ReadBytes(16));
                 item.Position = reader.ReadInt64();
                 item.Length   = reader.ReadInt64();
                 index.Add(item.StreamId, item);
             }
         }
     }
     indexChanged = false;
 }
Beispiel #2
0
 internal Stream OpenStream(Guid id)
 {
     return(physicalStore.OpenStream(id));
 }