-
Notifications
You must be signed in to change notification settings - Fork 292
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
Add support for aliases on netcore+Windows #1588
Conversation
@@ -1102,20 +1102,6 @@ internal PoolBlockingPeriod ConvertValueToPoolBlockingPeriod() | |||
} | |||
} | |||
|
|||
#if NETFRAMEWORK |
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 diff is a bit misleading. This "deleted" section simply moved down and the NetLib code moved up so that the NetLib code is available on netcore.
} | ||
|
||
private const int NoProcessId = -1; | ||
private static int s_currentProcessId = NoProcessId; | ||
internal static int GetCurrentProcessIdForTdsLoginOnly() |
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 chose the netcore implementation of GetCurrentProcessIdForTdsLoginOnly over the netfx one that relied on the native method. I don't believe it will cause any noticeable behavior differences on netfx.
[ResourceConsumption(ResourceScope.Process, ResourceScope.Process)] | ||
static internal Int32 GetCurrentThreadIdForTdsLoginOnly() | ||
|
||
internal static int GetCurrentThreadIdForTdsLoginOnly() |
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 chose the netcore implementation of GetCurrentThreadIdForTdsLoginOnly over the netfx one that relied on the deprecated method. I don't believe it will cause any noticeable behavior differences on netfx.
|
||
object temp = ADP.LocalMachineRegistryValue(folder, localKey); | ||
if (temp is int) | ||
if (s_nicAddress != null) |
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 chose a merger of the netfx and netcore implementations of GetNetworkPhysicalAddressForTdsLoginOnly. Netcore had the optimization of caching s_nicAddress but did not have the registry lookup when running on Windows. Since this introduces registry lookups when on Windows, we can bring that functionality to netcore since users generally expect behavior parity when migrating from netfx to netcore.
src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs
Show resolved
Hide resolved
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.
All the test runs were skipped because the CanCreateAliases
didn't return true
.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/ConnectivityTest.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/ConnectivityTest.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/ConnectivityTest.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/ConnectivityTest.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStaticMethods.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStaticMethods.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #1588 +/- ##
==========================================
- Coverage 70.00% 69.99% -0.02%
==========================================
Files 327 327
Lines 64594 64561 -33
==========================================
- Hits 45218 45188 -30
+ Misses 19376 19373 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This brings support for aliases on netcore+Windows. It also merges TdsParserStaticMethods.cs into common code.
Functionally, this should bring alias support to netcore and netstandard when running on Windows.