dotnet / SqlClient

Microsoft.Data.SqlClient provides database connectivity to SQL Server for .NET applications.
MIT License
859 stars 288 forks source link

Merge | Pull in the rest of the interop files #2933

Closed benrr101 closed 2 weeks ago

benrr101 commented 3 weeks ago

Description: This PR is pretty straightforward, it brings in the rest of the files used for "interop". This is the first stage of a series of PRs that I've been working on that migrate the interop class to an interop namespace. This is a prerequisite for a prerequisite for merging LocalDBAPI. It is not strictly required, but it will make my life easier for merging the LocalDBAPI, and ideally it is work that should be done eventually anyhow.

Keep in mind if #2927 goes through, much of this code can be deleted since it is no longer needed in net8 or above.

This PR only moves the files, it does not make any code changes.

Testing: Projects still build, so there is no issue.

benrr101 commented 3 weeks ago

/azp run

azure-pipelines[bot] commented 3 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).
edwardneal commented 3 weeks ago

This looks good to me.

On a more general note, it looks like we're moving away from the various NativeMethods, SafeNativeMethods and UnsafeNativeMethods classes? If so my PR #2828 removes the currently-unused PInvokes from these code files, so there's no need to bother migrating those. There are quite a few other PInvokes in those files which are only used within the SQLDebugging class (and associated debugging infrastructure) though. I'd suggest ignoring those too - SQLDebugging is only used when debugging a client application connected to a local SQL 2000 instance, and when this is no longer permitted I'm planning to submit a PR which will eliminate that functionality and remove these PInvokes anyway.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@fc0acc0). Learn more about missing BASE report. Report is 14 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2933 +/- ## ======================================= Coverage ? 72.28% ======================================= Files ? 288 Lines ? 59663 Branches ? 0 ======================================= Hits ? 43128 Misses ? 16535 Partials ? 0 ``` | [Flag](https://app.codecov.io/gh/dotnet/SqlClient/pull/2933/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [addons](https://app.codecov.io/gh/dotnet/SqlClient/pull/2933/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `92.58% <ø> (?)` | | | [netcore](https://app.codecov.io/gh/dotnet/SqlClient/pull/2933/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `75.37% <ø> (?)` | | | [netfx](https://app.codecov.io/gh/dotnet/SqlClient/pull/2933/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `70.68% <ø> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

benrr101 commented 2 weeks ago

/azp run

azure-pipelines[bot] commented 2 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).