Example #1
0
 public void Dump()
 {
     if (this.isOpen)
     {
         Console.WriteLine(string.Concat(new object[]
         {
             "DataFile ",
             this.name,
             " is open in ",
             this.mode,
             " mode and contains ",
             this.keys.Values.Count,
             " objects:"
         }));
         foreach (ObjectKey current in this.keys.Values)
         {
             current.Dump();
         }
         Console.WriteLine("Free objects = " + this.freeNumber);
         using (List <FreeKey> .Enumerator enumerator2 = this.free.GetEnumerator())
         {
             while (enumerator2.MoveNext())
             {
                 FreeKey current2 = enumerator2.Current;
                 Console.WriteLine(current2.position + " " + current2.length);
             }
             return;
         }
     }
     Console.WriteLine("ObjectFile " + this.name + " is closed");
 }
Example #2
0
        public override object Read(BinaryReader reader)
        {
            List <FreeKey> list = new List <FreeKey>();

            reader.ReadByte();
            int num = reader.ReadInt32();

            for (int i = 0; i < num; i++)
            {
                FreeKey freeKey = new FreeKey();
                freeKey.Read(reader, true);
                list.Add(freeKey);
            }
            return(new FreeKeyList(list));
        }