Skip to content
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

Clean up AAsyncCallContext and SqlDataReader #925

Merged
merged 1 commit into from Jun 16, 2021

Conversation

Wraith2
Copy link
Contributor

@Wraith2 Wraith2 commented Feb 21, 2021

Looking though #921 I realized that I hadn't got around to merging the SqlDataReader.AAsyncCallContext class with the top level one that I later derived from it. So I did that. I've cleaned up the inheritance and made the relationships between the classes and the functions that use them a little clearer with some comments so hopefully others will find it less confusing.

There's a small change in GetFieldValueAsync to use a static delegate that already existed rather than allocating a lambda. This will have a minor memory improvement.

I'm still looking for a good way of caching the async call context for GetFieldValueAsync but that will wait for a future PR.

@Wraith2 Wraith2 force-pushed the dev-mergeasyncallscontexts branch from 10d2f76 to 404c88b Compare March 5, 2021 00:58
Base automatically changed from master to main March 15, 2021 17:54
@Wraith2 Wraith2 mentioned this pull request Jun 11, 2021
Copy link
Member

@DavoudEshtehari DavoudEshtehari left a comment

Choose a reason for hiding this comment

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

The class definition is in contrast with document. According to the design, my guess is the document should update.

CC @cheenamalhotra

@Wraith2
Copy link
Contributor Author

Wraith2 commented Jun 16, 2021

About inheritance? Yes, it does seem to say that it can't be inherited. In this case since we don't intend to provide any kind of extensibility and users could serious screw up their data or programs by tinkering with things that they shouldn't I think sealing it might be a good idea. It is a breaking change though.

@cheenamalhotra
Copy link
Member

The class definition is in contrast with document. According to the design, my guess is the document should update.

@DavoudEshtehari We can make a separate PR to address this.

@cheenamalhotra cheenamalhotra added this to In progress in SqlClient v4.0 via automation Jun 16, 2021
@cheenamalhotra cheenamalhotra added this to the 4.0.0-preview1 milestone Jun 16, 2021
@cheenamalhotra cheenamalhotra merged commit d28fe21 into dotnet:main Jun 16, 2021
SqlClient v4.0 automation moved this from In progress to Done Jun 16, 2021
@Wraith2 Wraith2 deleted the dev-mergeasyncallscontexts branch June 29, 2021 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants