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

Commit51a46b6

Browse files
authored
Merge branch 'main' into add-unit-test-project
2 parents7b175fd +01f85bf commit51a46b6

File tree

47 files changed

+1331
-942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1331
-942
lines changed

‎build.proj

Lines changed: 60 additions & 52 deletions
Large diffs are not rendered by default.

‎src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public SqlJson(string jsonString) { }
115115
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlJson.xml' path='docs/members[@name="SqlJson"]/ctor3/*' />
116116
publicSqlJson(System.Text.Json.JsonDocumentjsonDoc){}
117117
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlJson.xml' path='docs/members[@name="SqlJson"]/IsNull/*' />
118-
publicboolIsNull=>thrownull;
118+
publicboolIsNull=>thrownull;
119119
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlJson.xml' path='docs/members[@name="SqlJson"]/Null/*' />
120120
publicstaticSqlJsonNull=>thrownull;
121121
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlJson.xml' path='docs/members[@name="SqlJson"]/Value/*' />
@@ -458,12 +458,14 @@ internal SqlClientFactory() { }
458458
publicoverrideSystem.Data.Common.DbParameterCreateParameter(){thrownull;}
459459
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateDataSourceEnumerator/*'/>
460460
publicoverrideSystem.Data.Common.DbDataSourceEnumeratorCreateDataSourceEnumerator(){thrownull;}
461+
#ifNET
461462
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CanCreateBatch/*'/>
462463
publicoverrideboolCanCreateBatch{get{thrownull;}}
463464
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateBatch/*'/>
464465
publicoverrideSystem.Data.Common.DbBatchCreateBatch(){thrownull;}
465466
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientFactory.xml' path='docs/members[@name="SqlClientFactory"]/CreateBatchCommand/*'/>
466467
publicoverrideSystem.Data.Common.DbBatchCommandCreateBatchCommand(){thrownull;}
468+
#endif
467469
}
468470
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientLogger.xml' path='docs/members[@name="SqlClientLogger"]/SqlClientLogger/*'/>
469471
publicpartialclassSqlClientLogger
@@ -531,7 +533,7 @@ public enum SqlConnectionAttestationProtocol
531533
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnectionAttestationProtocol.xml' path='docs/members[@name="SqlConnectionAttestationProtocol"]/HGS/*' />
532534
HGS=3
533535
}
534-
536+
535537
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnectionIPAddressPreference.xml' path='docs/members[@name="SqlConnectionIPAddressPreference"]/SqlConnectionIPAddressPreference/*' />
536538
publicenumSqlConnectionIPAddressPreference
537539
{
@@ -1272,7 +1274,7 @@ internal SqlDataReader() { }
12721274
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml' path='docs/members[@name="SqlDataReader"]/RecordsAffected/*'/>
12731275
publicoverrideintRecordsAffected{get{thrownull;}}
12741276
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml' path='docs/members[@name="SqlDataReader"]/SensitivityClassification/*'/>
1275-
publicMicrosoft.Data.SqlClient.DataClassification.SensitivityClassificationSensitivityClassification{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
1277+
publicMicrosoft.Data.SqlClient.DataClassification.SensitivityClassificationSensitivityClassification{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
12761278
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml' path='docs/members[@name="SqlDataReader"]/VisibleFieldCount/*'/>
12771279
publicoverrideintVisibleFieldCount{get{thrownull;}}
12781280
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml' path='docs/members[@name="SqlDataReader"]/Close/*'/>
@@ -1499,7 +1501,9 @@ internal SqlException() { }
14991501
publicbyteState{get{thrownull;}}
15001502

15011503
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlException.xml' path='docs/members[@name="SqlException"]/GetObjectData/*'/>
1504+
#ifNET
15021505
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",DiagnosticId="SYSLIB0051",UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
1506+
#endif
15031507
publicoverridevoidGetObjectData(System.Runtime.Serialization.SerializationInfosi,System.Runtime.Serialization.StreamingContextcontext){}
15041508
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlException.xml' path='docs/members[@name="SqlException"]/ToString/*'/>
15051509
publicoverridestringToString(){thrownull;}
@@ -1639,7 +1643,7 @@ public SqlParameter(string parameterName, object value) { }
16391643
[System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)]
16401644
publicoverrideSystem.Data.ParameterDirectionDirection{get{thrownull;}set{}}
16411645
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlParameter.xml' path='docs/members[@name="SqlParameter"]/ForceColumnEncryption/*'/>
1642-
publicboolForceColumnEncryption{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}[System.Runtime.CompilerServices.CompilerGeneratedAttribute]set{}}
1646+
publicboolForceColumnEncryption{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}[System.Runtime.CompilerServices.CompilerGeneratedAttribute]set{}}
16431647
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlParameter.xml' path='docs/members[@name="SqlParameter"]/IsNullable/*'/>
16441648
[System.ComponentModel.DefaultValueAttribute(false)]
16451649
publicoverrideboolIsNullable{get{thrownull;}set{}}
@@ -1831,11 +1835,19 @@ public override void Commit() { }
18311835
protectedoverridevoidDispose(booldisposing){}
18321836
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlTransaction.xml' path='docs/members[@name="SqlTransaction"]/Rollback1/*'/>
18331837
publicoverridevoidRollback(){}
1838+
#ifNET
18341839
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlTransaction.xml' path='docs/members[@name="SqlTransaction"]/Rollback2/*'/>
18351840
publicoverridevoidRollback(stringtransactionName){}
18361841

18371842
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlTransaction.xml' path='docs/members[@name="SqlTransaction"]/Save/*'/>
18381843
publicoverridevoidSave(stringsavePointName){}
1844+
#else
1845+
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlTransaction.xml' path='docs/members[@name="SqlTransaction"]/Rollback2/*'/>
1846+
publicvoidRollback(stringtransactionName){}
1847+
1848+
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlTransaction.xml' path='docs/members[@name="SqlTransaction"]/Save/*'/>
1849+
publicvoidSave(stringsavePointName){}
1850+
#endif
18391851
}
18401852
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlRetryingEventArgs.xml' path='docs/members[@name="SqlRetryingEventArgs"]/SqlRetryingEventArgs/*' />
18411853
publicsealedclassSqlRetryingEventArgs:System.EventArgs
@@ -2713,27 +2725,27 @@ public partial class ColumnSensitivity
27132725
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/ColumnSensitivity.xml' path='docs/members[@name="ColumnSensitivity"]/ctor/*' />
27142726
publicColumnSensitivity(System.Collections.Generic.IList<Microsoft.Data.SqlClient.DataClassification.SensitivityProperty>sensitivityProperties){}
27152727
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/ColumnSensitivity.xml' path='docs/members[@name="ColumnSensitivity"]/GetSensitivityProperties/*' />
2716-
publicSystem.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Data.SqlClient.DataClassification.SensitivityProperty>SensitivityProperties{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2728+
publicSystem.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Data.SqlClient.DataClassification.SensitivityProperty>SensitivityProperties{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27172729
}
27182730
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/InformationType.xml' path='docs/members[@name="InformationType"]/InformationType/*' />
27192731
publicpartialclassInformationType
27202732
{
27212733
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/InformationType.xml' path='docs/members[@name="InformationType"]/ctor/*' />
27222734
publicInformationType(stringname,stringid){}
27232735
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/InformationType.xml' path='docs/members[@name="InformationType"]/Id/*' />
2724-
publicstringId{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2736+
publicstringId{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27252737
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/InformationType.xml' path='docs/members[@name="InformationType"]/Name/*' />
2726-
publicstringName{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2738+
publicstringName{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27272739
}
27282740
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/Label.xml' path='docs/members[@name="Label"]/Label/*' />
27292741
publicpartialclassLabel
27302742
{
27312743
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/Label.xml' path='docs/members[@name="Label"]/ctor/*' />
27322744
publicLabel(stringname,stringid){}
27332745
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/Label.xml' path='docs/members[@name="Label"]/Id/*' />
2734-
publicstringId{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2746+
publicstringId{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27352747
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/Label.xml' path='docs/members[@name="Label"]/Name/*' />
2736-
publicstringName{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2748+
publicstringName{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27372749
}
27382750
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityRank.xml' path='docs/members[@name="SensitivityRank"]/SensitivityRank/*' />
27392751
publicenumSensitivityRank
@@ -2757,11 +2769,11 @@ public partial class SensitivityClassification
27572769
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityClassification.xml' path='docs/members[@name="SensitivityClassification"]/ctor/*' />
27582770
publicSensitivityClassification(System.Collections.Generic.IList<Microsoft.Data.SqlClient.DataClassification.Label>labels,System.Collections.Generic.IList<Microsoft.Data.SqlClient.DataClassification.InformationType>informationTypes,System.Collections.Generic.IList<Microsoft.Data.SqlClient.DataClassification.ColumnSensitivity>columnSensitivity,SensitivityRanksensitivityRank){}
27592771
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityClassification.xml' path='docs/members[@name="SensitivityClassification"]/ColumnSensitivities/*' />
2760-
publicSystem.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Data.SqlClient.DataClassification.ColumnSensitivity>ColumnSensitivities{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2772+
publicSystem.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Data.SqlClient.DataClassification.ColumnSensitivity>ColumnSensitivities{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27612773
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityClassification.xml' path='docs/members[@name="SensitivityClassification"]/InformationTypes/*' />
2762-
publicSystem.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Data.SqlClient.DataClassification.InformationType>InformationTypes{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2774+
publicSystem.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Data.SqlClient.DataClassification.InformationType>InformationTypes{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27632775
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityClassification.xml' path='docs/members[@name="SensitivityClassification"]/Labels/*' />
2764-
publicSystem.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Data.SqlClient.DataClassification.Label>Labels{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2776+
publicSystem.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Data.SqlClient.DataClassification.Label>Labels{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27652777
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityClassification.xml' path='docs/members[@name="SensitivityClassification"]/SensitivityRank/*' />
27662778
publicSensitivityRankSensitivityRank{get{thrownull;}}
27672779
}
@@ -2771,9 +2783,9 @@ public partial class SensitivityProperty
27712783
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityProperty.xml' path='docs/members[@name="SensitivityProperty"]/ctor/*' />
27722784
publicSensitivityProperty(Microsoft.Data.SqlClient.DataClassification.Labellabel,Microsoft.Data.SqlClient.DataClassification.InformationTypeinformationType,SensitivityRanksensitivityRank){}
27732785
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityProperty.xml' path='docs/members[@name="SensitivityProperty"]/InformationType/*' />
2774-
publicMicrosoft.Data.SqlClient.DataClassification.InformationTypeInformationType{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2786+
publicMicrosoft.Data.SqlClient.DataClassification.InformationTypeInformationType{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27752787
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityProperty.xml' path='docs/members[@name="SensitivityProperty"]/Label/*' />
2776-
publicMicrosoft.Data.SqlClient.DataClassification.LabelLabel{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
2788+
publicMicrosoft.Data.SqlClient.DataClassification.LabelLabel{[System.Runtime.CompilerServices.CompilerGeneratedAttribute]get{thrownull;}}
27772789
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.DataClassification/SensitivityProperty.xml' path='docs/members[@name="SensitivityProperty"]/SensitivityRank/*' />
27782790
publicSensitivityRankSensitivityRank{get{thrownull;}}
27792791
}

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

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
<ProjectSdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
4-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0;netstandard2.0</TargetFrameworks>
55
<IntermediateOutputPath>$(ObjFolder)$(Configuration)\$(AssemblyName)\ref\</IntermediateOutputPath>
6+
<TargetGroupCondition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))'=='.NETCoreApp'">netcoreapp</TargetGroup>
67
<OutputPath>$(BinFolder)$(Configuration)\$(AssemblyName)\ref\</OutputPath>
8+
<!-- When building for library distribution (BuildForLib=true), set the output path to a netstandard-specific directory.
9+
This condition also ensures that netcoreapp builds are excluded from this path adjustment.-->
10+
<OutputPathCondition="'$(BuildForLib)' == 'true' AND '$(TargetGroup)' != 'netcoreapp'">$(BinFolder)$(Configuration).$(Platform)\$(AssemblyName)\netstandard\</OutputPath>
711
<DocumentationFile>$(OutputPath)\$(TargetFramework)\Microsoft.Data.SqlClient.xml</DocumentationFile>
812
<Product>Core $(BaseProduct)</Product>
913
<Configurations>Debug;Release;</Configurations>
10-
<TargetGroupCondition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))'=='.NETCoreApp'">netcoreapp</TargetGroup>
1114
<Platforms>AnyCPU;x64;x86</Platforms>
1215
</PropertyGroup>
13-
<!--Generating Strong Name-->
14-
<PropertyGroupCondition="$(CDP_BUILD_TYPE)==Official">
16+
<!--Generating Strong Name-->
17+
<PropertyGroupCondition="$(CDP_BUILD_TYPE)==Official">
1518
<SignAssembly>true</SignAssembly>
1619
<KeyFile>$(SigningKeyPath)</KeyFile>
1720
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
1821
</PropertyGroup>
1922
<PropertyGroupCondition="$(CDP_BUILD_TYPE)!=Official">
2023
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
2124
</PropertyGroup>
22-
2325
<ItemGroup>
2426
<InternalsVisibleToInclude="UnitTests" />
2527
</ItemGroup>
26-
2728
<ItemGroup>
2829
<CompileInclude="Microsoft.Data.SqlClient.cs" />
2930
<CompileInclude="Microsoft.Data.SqlClient.Manual.cs" />
31+
</ItemGroup>
32+
<ItemGroupCondition="$(TargetGroup) == 'netcoreapp'">
3033
<CompileInclude="..\..\ref\Microsoft.Data.SqlClient.Batch.cs" />
3134
<CompileInclude="..\..\ref\Microsoft.Data.SqlClient.Batch.NetCoreApp.cs" />
3235
</ItemGroup>
@@ -42,5 +45,8 @@
4245
<PackageReferenceInclude="Microsoft.Bcl.Cryptography"Version="$(MicrosoftBclCryptographyVersion)" />
4346
</ItemGroup>
4447

45-
<ImportProject="$(ToolsDir)targets\TrimDocsForIntelliSense.targets" />
48+
<ImportProject="$(ToolsDir)targets\ResolveContract.targets"Condition="'$(OSGroup)' == 'AnyOS' AND '$(TargetGroup)' != 'netcoreapp'" />
49+
<ImportProject="$(ToolsDir)targets\NotSupported.targets"Condition="'$(OSGroup)' == 'AnyOS' AND '$(TargetGroup)' != 'netcoreapp'" />
50+
<!-- Trim docs for intellisense for ref folder (netcore/netstandard) but not when building for lib folder (only netstandard is built for lib from here)-->
51+
<ImportProject="$(ToolsDir)targets\TrimDocsForIntelliSense.targets"Condition="'$(BuildForLib)' != 'true' OR '$(TargetGroup)' == 'netcoreapp'" />
4652
</Project>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp