Skip to content

Commit c0ae757

Browse files
authored
Merge AlwaysEncryptedHelperClasses, TdsParserHelperClasses (#2376)
1 parent 32b5a67 commit c0ae757

File tree

7 files changed

+81
-1431
lines changed

7 files changed

+81
-1431
lines changed

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@
165165
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\AlwaysEncryptedEnclaveProviderUtils.cs">
166166
<Link>Microsoft\Data\SqlClient\AlwaysEncryptedEnclaveProviderUtils.cs</Link>
167167
</Compile>
168+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\AlwaysEncryptedHelperClasses.cs">
169+
<Link>Microsoft\Data\SqlClient\AlwaysEncryptedHelperClasses.cs</Link>
170+
</Compile>
168171
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\AlwaysEncryptedKeyConverter.cs">
169172
<Link>Microsoft\Data\SqlClient\AlwaysEncryptedKeyConverter.cs</Link>
170173
</Compile>
@@ -594,6 +597,9 @@
594597
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParser.cs">
595598
<Link>Microsoft\Data\SqlClient\TdsParser.cs</Link>
596599
</Compile>
600+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserHelperClasses.cs">
601+
<Link>Microsoft\Data\SqlClient\TdsParserHelperClasses.cs</Link>
602+
</Compile>
597603
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserStateObject.cs">
598604
<Link>Microsoft\Data\SqlClient\TdsParserStateObject.cs</Link>
599605
</Compile>
@@ -642,7 +648,6 @@
642648
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionInternal.cs" />
643649
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPool.cs" />
644650
<Compile Include="Microsoft\Data\SqlClient\AAsyncCallContext.cs" />
645-
<Compile Include="Microsoft\Data\SqlClient\AlwaysEncryptedHelperClasses.cs" />
646651
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.cs" />
647652
<Compile Include="Microsoft\Data\SqlClient\Reliability\SqlConfigurableRetryLogicManager.NetCoreApp.cs" />
648653
<Compile Include="Microsoft\Data\SqlClient\SNI\ConcurrentQueueSemaphore.cs" />
@@ -685,7 +690,6 @@
685690
<Compile Include="Microsoft\Data\SqlClient\TdsParser.cs" />
686691
<Compile Include="Microsoft\Data\SqlClient\TdsParser.NetCoreApp.cs" />
687692
<Compile Include="Microsoft\Data\SqlClient\TdsParser.RegisterEncoding.cs" />
688-
<Compile Include="Microsoft\Data\SqlClient\TdsParserHelperClasses.cs" />
689693
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObject.netcore.cs" />
690694
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectManaged.cs" />
691695
<Compile Include="Microsoft\Data\SqlTypes\SqlTypeWorkarounds.netcore.cs" />

src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj

+8-3
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
<!-- Override debugtype=portable in Directory.Build.props for netfx -->
3131
<PropertyGroup>
3232
<DebugType>full</DebugType>
33-
</PropertyGroup>
33+
</PropertyGroup>
3434
<PropertyGroup>
3535
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)\$(TargetFramework)','$(GeneratedSourceFileName)'))</TargetFrameworkMonikerAssemblyAttributesPath>
3636
</PropertyGroup>
3737
<ItemGroup>
3838
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
3939
<EmbeddedFiles Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
40-
</ItemGroup>
40+
</ItemGroup>
4141
<PropertyGroup>
4242
<!-- CSC Compiler Options -->
4343
<NoConfig>True</NoConfig>
@@ -219,6 +219,9 @@
219219
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\AlwaysEncryptedEnclaveProviderUtils.cs">
220220
<Link>Microsoft\Data\SqlClient\AlwaysEncryptedEnclaveProviderUtils.cs</Link>
221221
</Compile>
222+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\AlwaysEncryptedHelperClasses.cs">
223+
<Link>Microsoft\Data\SqlClient\AlwaysEncryptedHelperClasses.cs</Link>
224+
</Compile>
222225
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\AlwaysEncryptedKeyConverter.cs">
223226
<Link>Microsoft\Data\SqlClient\AlwaysEncryptedKeyConverter.cs</Link>
224227
</Compile>
@@ -633,6 +636,9 @@
633636
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsRecordBufferSetter.cs">
634637
<Link>Microsoft\Data\SqlClient\TdsRecordBufferSetter.cs</Link>
635638
</Compile>
639+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserHelperClasses.cs">
640+
<Link>Microsoft\Data\SqlClient\TdsParserHelperClasses.cs</Link>
641+
</Compile>
636642
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserSessionPool.cs">
637643
<Link>Microsoft\Data\SqlClient\TdsParserSessionPool.cs</Link>
638644
</Compile>
@@ -721,7 +727,6 @@
721727
<Compile Include="Microsoft\Data\SqlClient\SqlSequentialTextReaderSmi.cs" />
722728
<Compile Include="Microsoft\Data\SqlClient\SqlTransaction.cs" />
723729
<Compile Include="Microsoft\Data\SqlClient\TdsParser.cs" />
724-
<Compile Include="Microsoft\Data\SqlClient\TdsParserHelperClasses.cs" />
725730
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObject.netfx.cs" />
726731
<Compile Include="Microsoft\Data\SqlTypes\SqlFileStream.cs" />
727732
<Compile Include="Microsoft\Data\SqlTypes\SqlStreamChars.cs" />

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlDataReader.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1678,15 +1678,15 @@ override public DataTable GetSchemaTable()
16781678
try
16791679
{
16801680
statistics = SqlStatistics.StartTimer(Statistics);
1681-
if (_metaData == null || _metaData._schemaTable == null)
1681+
if (_metaData == null || _metaData.schemaTable == null)
16821682
{
16831683
if (this.MetaData != null)
16841684
{
1685-
_metaData._schemaTable = BuildSchemaTable();
1686-
Debug.Assert(_metaData._schemaTable != null, "No schema information yet!");
1685+
_metaData.schemaTable = BuildSchemaTable();
1686+
Debug.Assert(_metaData.schemaTable != null, "No schema information yet!");
16871687
}
16881688
}
1689-
return _metaData?._schemaTable;
1689+
return _metaData?.schemaTable;
16901690
}
16911691
finally
16921692
{
@@ -4847,7 +4847,7 @@ internal TdsOperationStatus TrySetMetaData(_SqlMetaDataSet metaData, bool moreIn
48474847
_tableNames = null;
48484848
if (_metaData != null)
48494849
{
4850-
_metaData._schemaTable = null;
4850+
_metaData.schemaTable = null;
48514851
_data = SqlBuffer.CreateBufferArray(metaData.Length);
48524852
}
48534853

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ private void EnableSsl(uint info, SqlConnectionEncryptOption encrypt, bool integ
13001300
ThrowExceptionAndWarning(_physicalStateObj);
13011301
}
13021302

1303-
string warningMessage = SslProtocolsHelper.GetProtocolWarning(protocolVersion);
1303+
string warningMessage = ((System.Security.Authentication.SslProtocols)protocolVersion).GetProtocolWarning();
13041304
if (!string.IsNullOrEmpty(warningMessage))
13051305
{
13061306
if (!encrypt && LocalAppContextSwitches.SuppressInsecureTLSWarning)

0 commit comments

Comments
 (0)