Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Add IFileInfo overloads for SendFileAsync. #555

Merged
merged 1 commit into from
Feb 8, 2016
Merged

Conversation

Tratcher
Copy link
Member

@Tratcher Tratcher commented Feb 4, 2016

@Tratcher Tratcher self-assigned this Feb 4, 2016
@Tratcher Tratcher added this to the 1.0.0-rc2 milestone Feb 4, 2016
{
using (var fileContent = file.CreateReadStream())
{
fileContent.Seek(offset, SeekOrigin.Begin);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the stream always seekable?

@davidfowl
Copy link
Member

Small comment around seek-ability of the stream. We should probably throw if we can't seek and the index isn't 0.

@lodejard
Copy link
Contributor

lodejard commented Feb 5, 2016

and don't seek if the offset is 0

@Tratcher
Copy link
Member Author

Tratcher commented Feb 5, 2016

🆙📅 Seek will throw if it's not seekable. No need to add our own exception unless it becomes a frequent point of confusion.

@Tratcher Tratcher merged commit 04e9da4 into dev Feb 8, 2016
@Tratcher Tratcher deleted the tratcher/sendfile branch February 8, 2016 19:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants