Example #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;
 }
Example #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();
 }
Example #3
0
 public StreamWriterEx(Stream stream, StreamWriterEx prev)
     : base(stream)
 {
     prev.next = this;
     this.prev = prev;
 }