Exemple #1
0
        public Stream GetOriginalBook(BookModel book)
        {
            var destinationStream = new MemoryStream();

            using (var file = FileStorage.Instance.GetFile(book.GetBookPath()))
            {
                using (file.Lock())
                {
                    file.Reader.BaseStream.CopyTo(destinationStream);
                }
            }
            destinationStream.Seek(0, SeekOrigin.Begin);
            return(destinationStream);
        }