Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR moves the SessionHandle class implementations from the netcore project into the common project and wraps the classes in conditional compilation blocks (#if NET) to support portability between Windows and Unix.
- Moves implementations of SessionHandle from netcore-specific files to a common project
- Introduces #if NET directives in both Windows and Unix source files as a temporary solution
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/SessionHandle.netcore.Windows.cs | Added "#if NET" wrapping to support conditional compilation for Windows-only code |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Unix.cs | Added "#if NET" wrapping to support conditional compilation for Unix-specific code |
Files not reviewed (1)
- src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj: Language not supported
Comments suppressed due to low confidence (2)
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Windows.cs:5
- [nitpick] The conditional compilation symbol 'NET' is ambiguous given the multiple .NET versions available; consider using a more descriptive symbol (e.g., NETCORE or NET5_0_OR_GREATER) to clarify its intent.
#if NET
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Unix.cs:5
- [nitpick] The conditional compilation symbol 'NET' is ambiguous given the multiple .NET versions available; consider using a more descriptive symbol (e.g., NETCORE or NET5_0_OR_GREATER) to clarify its intent.
#if NET
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3247 +/- ##
==========================================
+ Coverage 72.69% 72.82% +0.13%
==========================================
Files 303 300 -3
Lines 59718 59611 -107
==========================================
Hits 43414 43414
+ Misses 16304 16197 -107
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: Super duper easy, moving the SessionHandle class implementations from the netcore project to the common project. Classes are now wrapped with #if NET
There's a very small difference between the two files, but as it stands today we don't have the right solution for #if defining the OS. This will be addressed later, once all classes have been merged.
Testing: Literally no functional changes. Tests should breeze through unless I goofed on building for Unix.