-
Notifications
You must be signed in to change notification settings - Fork 312
Merge/Cleanup | GreenMethods #3254
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
Conversation
…tation in SqlClientFactory
…l free to argue with me.
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.
Pull Request Overview
This PR removes the unused GreenMethods class and integrates its functionality directly into SqlClientFactory with a simplified lazy-loading implementation. Key changes include:
- Elimination of the GreenMethods class.
- Incorporation of lazy initialization for provider service types within SqlClientFactory.
- Simplification of error message documentation and reduction of redundant reflection code.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientFactory.cs | Merges GreenMethods functionality into SqlClientFactory and refactors service resolution logic. |
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/GreenMethods.cs | Removes the deprecated GreenMethods class as it is no longer needed. |
Files not reviewed (1)
- src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj: Language not supported
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3254 +/- ##
==========================================
+ Coverage 72.82% 72.94% +0.12%
==========================================
Files 298 297 -1
Lines 59614 59614
==========================================
+ Hits 43411 43483 +72
+ Misses 16203 16131 -72
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description: There was an oddly named
GreenMethods
in the common namespace for the netfx project. Upon inspection, the code was only being used in SqlClientFactory, so I rolled that into the SqlClientFactory. Not only that, but I simplified the implementation quite a bit by usingLazy
objects (which was sort of called for in the original comments). A permission attribute about reflection was removed in the process and if it turns out this was super important, I can roll these changes back to a more traditional merge.As such, the
GreenMethods
class is removed 🚮