-
Notifications
You must be signed in to change notification settings - Fork 352
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
Implement asynchronous support in ODataJsonLightParameterReader #2353
Implement asynchronous support in ODataJsonLightParameterReader #2353
Conversation
f00d2dc
to
1038041
Compare
7d5bd02
to
08f5e01
Compare
d534cf8
to
645e9fc
Compare
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
@@ -192,7 +194,7 @@ public override sealed bool Read() | |||
public override sealed Task<bool> ReadAsync() | |||
{ | |||
this.VerifyCanRead(false); | |||
return this.ReadAsynchronously().FollowOnFaultWith(t => this.EnterScope(ODataParameterReaderState.Exception, null, null)); | |||
return this.InterceptExceptionAsync((thisParam) => thisParam.ReadAsynchronously()); |
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.
Did you update the this.ReadAsynchronously
to be "truly async"? I don't think I've seen it on the diff.
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.
@habbes The "truly async" implementation of ReadAsynchronously
is in ODataParameterReaderCoreAsync
class
@@ -432,6 +434,27 @@ protected virtual Task<bool> ReadAsynchronously() | |||
return TaskUtils.GetTaskForSynchronousOperation<bool>(this.ReadImplementation); |
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.
Shouldn't this be "truly async" as well?
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.
@habbes The "truly async" implementation of ReadAsynchronously
is contained in ODataParameterReaderCoreAsync
. Because ReadAsync
method is declared as abstract
and ODataParameterReaderCore
needs to override it, we're just wrapping the synchronous method in a task as a stub implementation.
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.
Oh, is that worth mentioning in a comment?
@@ -432,6 +434,27 @@ protected virtual Task<bool> ReadAsynchronously() | |||
return TaskUtils.GetTaskForSynchronousOperation<bool>(this.ReadImplementation); |
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.
Oh, is that worth mentioning in a comment?
Issues
This pull request partially fulfills #2019.
Description
Implement asynchronous support in
ODataJsonLightParameterReader
.Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.