-
Notifications
You must be signed in to change notification settings - Fork 312
Merge | SqlColumnEncryption*.Unix #3305
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
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 SqlColumnEncryption* classes targeting Unix from platform-specific locations to the common project and wraps them in a preprocessor directive to ensure they are only applied to .NET Core builds. Key changes include:
- Wrapping Unix-specific code in "#if NET" preprocessor directives.
- Renaming files to include the ".netcore.Unix" suffix.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionCspProvider.netcore.Unix.cs | Added "#if NET" wrapper and corresponding "#endif". |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionCngProvider.netcore.Unix.cs | Added "#if NET" wrapper and corresponding "#endif". |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionCertificateStoreProvider.netcore.Unix.cs | Added "#if NET" wrapper and corresponding "#endif". |
Files not reviewed (1)
- src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj: Language not supported
Comments suppressed due to low confidence (3)
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionCspProvider.netcore.Unix.cs:5
- [nitpick] Consider revisiting the preprocessor condition here. Since the file is exclusively for Unix on .NET Core, using a more specific conditional (e.g., #if NETCOREAPP) might improve clarity and maintainability.
#if NET
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionCngProvider.netcore.Unix.cs:5
- [nitpick] Consider revisiting the preprocessor condition here. Since the file is exclusively for Unix on .NET Core, using a more specific conditional (e.g., #if NETCOREAPP) might improve clarity and maintainability.
#if NET
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionCertificateStoreProvider.netcore.Unix.cs:5
- [nitpick] Consider revisiting the preprocessor condition here. Since the file is exclusively for Unix on .NET Core, using a more specific conditional (e.g., #if NETCOREAPP) might improve clarity and maintainability.
#if NET
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3305 +/- ##
==========================================
- Coverage 67.74% 64.20% -3.55%
==========================================
Files 298 298
Lines 65536 65536
==========================================
- Hits 44397 42076 -2321
- Misses 21139 23460 +2321
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: This is the easiest one so far - literally moving the SqlColumnEncryption*.Unix classes to the common project. The files were wrapped in an
#if NET
to make sure they're only applied to netcore. The suffixes were updated to ".netcore.Unix" - I'm not entirely sure the best way to approach this since the class only applies to Unix, which implicitly means it only applies to netcore.Testing: The files were cut and pasted, there was no code changes.