示例#1
0
        private IEnumerable <Stream> GetAllStreams()
        {
            yield return(PrimaryStream);

            foreach (var stream in OtherStreams.Where(x => x != null))
            {
                yield return(stream);
            }
        }
示例#2
0
        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);
        }