- Notifications
You must be signed in to change notification settings - Fork311
Merge | SessionHandle.*.cs#3247
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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 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
codecovbot commentedMar 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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:
|
4c7219d
intomainUh oh!
There was an error while loading.Please reload this page.
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.