-
Notifications
You must be signed in to change notification settings - Fork 303
Merge to shared - SqlInternalConnection #1598
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merge to shared - SqlInternalConnection #1598
Conversation
… from netfx and update the project references
I think once the codebases a merged we'll be able to do another pass to clean up naming and style. |
Codecov ReportBase: 71.67% // Head: 71.47% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1598 +/- ##
==========================================
- Coverage 71.67% 71.47% -0.21%
==========================================
Files 293 292 -1
Lines 61376 61218 -158
==========================================
- Hits 43990 43754 -236
- Misses 17386 17464 +78
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalConnection.cs
Show resolved
Hide resolved
#if NETFRAMEWORK | ||
private bool _isAzureSQLConnection = false; // If connected to Azure SQL | ||
#else |
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.
Just for having a more transparent code, I'd suggest keeping netfx-specific source code together as much as possible instead of scattered if-else
directives.
catch (System.OutOfMemoryException e) | ||
{ | ||
Connection.Abort(e); | ||
throw; | ||
} | ||
catch (System.StackOverflowException e) | ||
{ | ||
Connection.Abort(e); | ||
throw; | ||
} | ||
catch (System.Threading.ThreadAbortException e) | ||
{ | ||
Connection.Abort(e); | ||
BestEffortCleanup(bestEffortCleanupTarget); | ||
throw; |
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.
This section can be added to the netcore as well.
cc @David-Engel
catch (OutOfMemoryException) | ||
{ | ||
DoomThisConnection(); | ||
throw; | ||
} | ||
catch (StackOverflowException) | ||
{ | ||
DoomThisConnection(); | ||
throw; | ||
} | ||
catch (System.Threading.ThreadAbortException) | ||
{ | ||
DoomThisConnection(); | ||
BestEffortCleanup(bestEffortCleanupTarget); | ||
throw; | ||
} |
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.
This section can be added to the netcore 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.
I see more opportunities to change like "Order modifiers" and "Expression body" that don't affect the program logic. So, I'll leave it to your choice. 🙂
Relates to #1261. Merged netfx into netcore for SqlInternalConnection, and moving it to shared src and updating file to conform with coding style. There's a few IDE1006 naming violations because it's being referenced in SqlDataReader and SqlCommand, so I left those alone.