-
-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use FileOptions.Asynchronous
when doing async IO
#2488
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, just some naming changes to implement to match project convention. Thanks for helping out!
/// </summary> | ||
/// <param name="path">Path to the file to open.</param> | ||
/// <returns>A stream representing the file to open.</returns> | ||
/// <returns>A stream representing the opened file.</returns> | ||
Stream OpenReadAsynchronous(string path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use Async as the suffix to match convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JimBobSquarePants I agree that the Asynchronous suffix looks weird, but I didn't use the Async suffix because the method isn't actually async and doesn't return a Task or anything awaitable. Having that suffix would be misleading and would actually go against the convention. Do you really want to go against the guidelines and have an Async suffix even though the method is synchronous and can't be awaited?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, I misread the code before. Naming is fine then. I'm not that precious about it since it's internal.
Prerequisites
Description
Fixes #2487