Ejemplo n.º 1
0
 internal void ReadAllPages()
 {
     using (ContainerReader.PageReaderLock pageLock = this._container.TakePageReaderLock())
     {
         while (!this._eosFound)
         {
             this._container.GatherNextPage(this._streamSerial, pageLock);
         }
     }
 }
Ejemplo n.º 2
0
 private void GetMorePackets()
 {
     using (ContainerReader.PageReaderLock pageLock = this._container.TakePageReaderLock())
     {
         if (this._eosFound)
         {
             return;
         }
         this._container.GatherNextPage(this._streamSerial, pageLock);
     }
 }
Ejemplo n.º 3
0
 internal int GetTotalPageCount()
 {
     this._eosFlags.Add(-1, false);
     while (this._stream.Position < this._stream.Length - 28L)
     {
         using (ContainerReader.PageReaderLock pageLock = this.TakePageReaderLock())
             this.GatherNextPage(-1, pageLock);
     }
     this._eosFlags.Remove(-1);
     return(this._pageCount);
 }
Ejemplo n.º 4
0
 internal void GatherNextPage(int streamSerial, ContainerReader.PageReaderLock pageLock)
 {
     if (pageLock == null)
     {
         throw new ArgumentNullException("pageLock");
     }
     if (!pageLock.Validate(this._pageLock))
     {
         throw new ArgumentException("pageLock");
     }
     if (!this._eosFlags.ContainsKey(streamSerial))
     {
         throw new ArgumentOutOfRangeException("streamSerial");
     }
     while (!this._eosFlags[streamSerial])
     {
         if (this.GatherNextPage("Could not find next page.") == streamSerial)
         {
             return;
         }
     }
     throw new EndOfStreamException();
 }