Exemple #1
0
 public TakeStream(Stream stream, long count, bool leaveOpen)
     : base(StreamCapabilities.InferFrom(stream).Intersect(ReadCapabilities), ReadCapabilities)
 {
     this.stream          = stream;
     this.count           = this.remaining = count;
     this.initialPosition = stream.CanSeek ? stream.Position : default(long?);
     this.leaveOpen       = leaveOpen;
 }
Exemple #2
0
 public AutoFlushedStream(Stream stream, bool leaveOpen)
     : base(StreamCapabilities.InferFrom(stream).Intersect(BaseCapabilities), BaseCapabilities)
 {
     this.stream    = stream;
     this.leaveOpen = leaveOpen;
 }
Exemple #3
0
 public ConcatStream(Stream first, Stream second)
     : base(StreamCapabilities.InferFrom(first).Intersect(StreamCapabilities.InferFrom(second)).Intersect(ReadCapabilities), ReadCapabilities)
 {
     this.first  = first;
     this.second = second;
 }