private IEnumerable <Stream> GetAllStreams() { yield return(PrimaryStream); foreach (var stream in OtherStreams.Where(x => x != null)) { yield return(stream); } }
public override long Seek(long offset, SeekOrigin origin) { if (!CanSeek) { throw new InvalidOperationException("Not all stream are seekable"); } var result = PrimaryStream.Seek(offset, origin); foreach (var stream in OtherStreams.Where(x => x != null)) { stream.Seek(offset, origin); } return(result); }