Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcc23e04

Browse files
authored
Merge | Managed SNI (#3345)
* Move all SNI files to common project* Move all managed SNI classes to ManagedSni namespace* SNIError => SniError* SNIHandle => SniHandle* SNILoadHandle => SniLoadHandle* SNIMarsConnection => SniMarsConnection* SNIMarsHandle => SniMarsHandle* SNINpHandle => SniNpHandle* SNIPacket => SniPacket* SNIPhysicalHandle => SniPhysicalHandle* SNIProxy => SniProxy* SNITcpHandle => SniTcpHandle* Extract SniAsyncCallback to its own file* Extract SniProviders to its own file* Extract SniSmuxHeader to its own file* Extract SniSmuxFlags to its own file* SNICommon => SniCommon* Extract SniSslStream to its own file* Extract SniNetworkStream to its own file, delete SniStreams file* Merge value task partial into the appropriate stream classes* Wrap all files in #if NET* SNISMUXHeader => SniSmuxHeader ... whoops* Rename SSRP to SsrpClient* Change reflection references to SNI* Fix release-only reference* I can't trust any changes I make to the test projects, so I'm just gonna roll back this change.
1 parent85f00ea commitcc23e04

File tree

38 files changed

+997
-812
lines changed

38 files changed

+997
-812
lines changed

‎src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 70 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,69 @@
275275
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\LocalAppContextSwitches.cs">
276276
<Link>Microsoft\Data\SqlClient\LocalAppContextSwitches.cs</Link>
277277
</Compile>
278+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\ConcurrentQueueSemaphore.netcore.cs">
279+
<Link>Microsoft\Data\SqlClient\ManagedSni\ConcurrentQueueSemaphore.netcore.cs</Link>
280+
</Compile>
281+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniAsyncCallback.netcore.cs">
282+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniAsyncCallback.netcore.cs</Link>
283+
</Compile>
284+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniError.netcore.cs">
285+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniError.netcore.cs</Link>
286+
</Compile>
287+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniCommon.netcore.cs">
288+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniCommon.netcore.cs</Link>
289+
</Compile>
290+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniHandle.netcore.cs">
291+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniHandle.netcore.cs</Link>
292+
</Compile>
293+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniLoadHandle.netcore.cs">
294+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniLoadHandle.netcore.cs</Link>
295+
</Compile>
296+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniMarsConnection.netcore.cs">
297+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniMarsConnection.netcore.cs</Link>
298+
</Compile>
299+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniMarsHandle.netcore.cs">
300+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniMarsHandle.netcore.cs</Link>
301+
</Compile>
302+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniNetworkStream.netcore.cs">
303+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniNetworkStream.netcore.cs</Link>
304+
</Compile>
305+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniNpHandle.netcore.cs">
306+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniNpHandle.netcore.cs</Link>
307+
</Compile>
308+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniPacket.netcore.cs">
309+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniPacket.netcore.cs</Link>
310+
</Compile>
311+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniPhysicalHandle.netcore.cs">
312+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniPhysicalHandle.netcore.cs</Link>
313+
</Compile>
314+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniProviders.netcore.cs">
315+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniProviders.netcore.cs</Link>
316+
</Compile>
317+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniProxy.netcore.cs">
318+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniProxy.netcore.cs</Link>
319+
</Compile>
320+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniSmuxFlags.netcore.cs">
321+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniSmuxFlags.netcore.cs</Link>
322+
</Compile>
323+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniSmuxHeader.netcore.cs">
324+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniSmuxHeader.netcore.cs</Link>
325+
</Compile>
326+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniSslStream.netcore.cs">
327+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniSslStream.netcore.cs</Link>
328+
</Compile>
329+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SniTcpHandle.netcore.cs">
330+
<Link>Microsoft\Data\SqlClient\ManagedSni\SniTcpHandle.netcore.cs</Link>
331+
</Compile>
332+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SslOverTdsStream.netcore.cs">
333+
<Link>Microsoft\Data\SqlClient\ManagedSni\SslOverTdsStream.netcore.cs</Link>
334+
</Compile>
335+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SslOverTdsStream.NetCoreApp.cs">
336+
<Link>Microsoft\Data\SqlClient\ManagedSni\SslOverTdsStream.NetCoreApp.cs</Link>
337+
</Compile>
338+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\SsrpClient.netcore.cs">
339+
<Link>Microsoft\Data\SqlClient\ManagedSni\SsrpClient.netcore.cs</Link>
340+
</Compile>
278341
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\NoneAttestationEnclaveProvider.cs">
279342
<Link>Microsoft\Data\SqlClient\NoneAttestationEnclaveProvider.cs</Link>
280343
</Compile>
@@ -731,25 +794,8 @@
731794
<CompileInclude="$(CommonSourceRoot)System\Diagnostics\CodeAnalysis.cs">
732795
<Link>System\Diagnostics\CodeAnalysis.cs</Link>
733796
</Compile>
734-
797+
735798
<CompileInclude="Microsoft\Data\Common\ConnectionString\DbConnectionOptions.netcore.cs" />
736-
<CompileInclude="Microsoft\Data\SqlClient\SNI\ConcurrentQueueSemaphore.cs" />
737-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNIError.cs" />
738-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNICommon.cs" />
739-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNIHandle.cs" />
740-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNILoadHandle.cs" />
741-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNIMarsConnection.cs" />
742-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNIMarsHandle.cs" />
743-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNINpHandle.cs" />
744-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNIPacket.cs" />
745-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNIPhysicalHandle.cs" />
746-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNIProxy.cs" />
747-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNIStreams.cs" />
748-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNIStreams.ValueTask.cs" />
749-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SNITcpHandle.cs" />
750-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SslOverTdsStream.cs" />
751-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SslOverTdsStream.NetCoreApp.cs" />
752-
<CompileInclude="Microsoft\Data\SqlClient\SNI\SSRP.cs" />
753799
<CompileInclude="Microsoft\Data\SqlClient\SqlAppContextSwitchManager.NetCoreApp.cs" />
754800
<CompileInclude="Microsoft\Data\SqlClient\SqlBulkCopy.cs" />
755801
<CompileInclude="Microsoft\Data\SqlClient\SqlConnectionFactory.AssemblyLoadContext.cs" />
@@ -882,6 +928,9 @@
882928
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Windows.cs">
883929
<Link>Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Windows.cs</Link>
884930
</Compile>
931+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\LocalDB.netcore.Windows.cs">
932+
<Link>Microsoft\Data\SqlClient\ManagedSni\LocalDB.netcore.Windows.cs</Link>
933+
</Compile>
885934
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\PacketHandle.Windows.cs">
886935
<Link>Microsoft\Data\SqlClient\PacketHandle.Windows.cs</Link>
887936
</Compile>
@@ -910,7 +959,6 @@
910959
<Link>Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs</Link>
911960
</Compile>
912961

913-
<CompileInclude="Microsoft\Data\SqlClient\SNI\LocalDB.Windows.cs" />
914962
<CompileInclude="Microsoft\Data\SqlClient\TdsParser.Windows.cs" />
915963
<CompileInclude="Microsoft\Data\SqlClient\TdsParserStateObjectNative.cs" />
916964
</ItemGroup>
@@ -929,6 +977,9 @@
929977
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Unix.cs">
930978
<Link>Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Unix.cs</Link>
931979
</Compile>
980+
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\ManagedSni\LocalDB.netcore.Unix.cs">
981+
<Link>Microsoft\Data\SqlClient\ManagedSni\LocalDB.netcore.Unix.cs</Link>
982+
</Compile>
932983
<CompileInclude="$(CommonSourceRoot)Microsoft\Data\SqlClient\PacketHandle.netcore.Unix.cs">
933984
<Link>Microsoft\Data\SqlClient\PacketHandle.netcore.Unix.cs</Link>
934985
</Compile>
@@ -951,7 +1002,6 @@
9511002
<Link>Microsoft\Data\SqlTypes\SqlFileStream.netcore.Unix.cs</Link>
9521003
</Compile>
9531004

954-
<CompileInclude="Microsoft\Data\SqlClient\SNI\LocalDB.Unix.cs" />
9551005
<CompileInclude="Microsoft\Data\SqlClient\TdsParser.Unix.cs" />
9561006
</ItemGroup>
9571007

‎src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIStreams.ValueTask.cs

Lines changed: 0 additions & 109 deletions
This file was deleted.

‎src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIStreams.cs

Lines changed: 0 additions & 41 deletions
This file was deleted.

‎src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.Unix.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
usingMicrosoft.Data.SqlClient.SNI;
5+
usingMicrosoft.Data.SqlClient.ManagedSni;
66

77
namespaceMicrosoft.Data.SqlClient
88
{
@@ -26,7 +26,7 @@ private void WaitForSSLHandShakeToComplete(ref uint error, ref int protocolVersi
2626
privateSNIErrorDetailsGetSniErrorDetails()
2727
{
2828
SNIErrorDetailsdetails;
29-
SNIErrorsniError=SNIProxy.Instance.GetLastError();
29+
SniErrorsniError=SniProxy.Instance.GetLastError();
3030
details.sniErrorNumber=sniError.sniError;
3131
details.errorMessage=sniError.errorMessage;
3232
details.nativeError=sniError.nativeError;

‎src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.Windows.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
usingSystem;
66
usingSystem.Diagnostics;
77
usingInterop.Windows.Sni;
8-
usingMicrosoft.Data.SqlClient.SNI;
8+
usingMicrosoft.Data.SqlClient.ManagedSni;
9+
usingSniError=Microsoft.Data.SqlClient.ManagedSni.SniError;
910

1011
namespaceMicrosoft.Data.SqlClient
1112
{
@@ -68,7 +69,7 @@ private SNIErrorDetails GetSniErrorDetails()
6869

6970
if(TdsParserStateObjectFactory.UseManagedSNI)
7071
{
71-
SNIErrorsniError=SNIProxy.Instance.GetLastError();
72+
SniErrorsniError=SniProxy.Instance.GetLastError();
7273
details.sniErrorNumber=sniError.sniError;
7374
details.errorMessage=sniError.errorMessage;
7475
details.nativeError=sniError.nativeError;
@@ -79,7 +80,7 @@ private SNIErrorDetails GetSniErrorDetails()
7980
}
8081
else
8182
{
82-
SniNativeWrapper.SniGetLastError(outSniErrorsniError);
83+
SniNativeWrapper.SniGetLastError(outInterop.Windows.Sni.SniErrorsniError);
8384
details.sniErrorNumber=sniError.sniError;
8485
details.errorMessage=sniError.errorMessage;
8586
details.nativeError=sniError.nativeError;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp