Exemplo n.º 1
0
 public StreamWriterEx(Stream stream, StreamWriterEx prev)
     : base(stream)
 {
     if (prev != null)
     {
         if (prev.next != null)
         {
             throw new Exception("Prev already in chain");
         }
         prev.next = this;
     }
     this.prev = prev;
 }
Exemplo n.º 2
0
 public new void Dispose()
 {
     if (prev != null)
     {
         Flush();
         BaseStream.Flush();
         BaseStream.Position = 0;
         prev.Flush();
         prev.BaseStream.Flush();
         BaseStream.CopyTo(prev.BaseStream);
         prev.next = null;
         prev      = null;
     }
     if (next != null)
     {
         next.prev = null;
         next      = null;
     }
     base.Dispose();
 }
Exemplo n.º 3
0
 public StreamWriterEx(Stream stream, StreamWriterEx prev)
     : base(stream)
 {
     prev.next = this;
     this.prev = prev;
 }