Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit 3cba68f

Browse files
dotnet-maestro-botViktorHofer
authored andcommitted
[automated] Merge branch 'release/3.0' => 'release/3.1' (#41079)
* Disable SDL validation (#40903) SDL validation is too expensive to run on a per-build basis. Disable for now * [release/3.0] Update dependencies from dotnet/standard (#40911) * Update dependencies from https://github.com/dotnet/standard build 20190907.2 - NETStandard.Library - 2.1.0-prerelease.19457.2 * Update dependencies from https://github.com/dotnet/standard build 20190907.1 - NETStandard.Library - 2.1.0-prerelease.19457.1 * [release/3.0] Update dependencies from 3 repositories (#40915) * Update dependencies from https://github.com/dotnet/core-setup build 20190907.02 - Microsoft.NETCore.App - 3.0.0-rc2-19457-02 - Microsoft.NETCore.DotNetHost - 3.0.0-rc2-19457-02 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-rc2-19457-02 * Update dependencies from https://github.com/dotnet/arcade build 20190906.10 - Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19456.10 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19456.10 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19456.10 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19456.10 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19456.10 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19456.10 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19456.10 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19456.10 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19456.10 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19456.10 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19456.10 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19456.10 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19456.10 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19456.10 * Update dependencies from https://github.com/dotnet/standard build 20190907.5 - NETStandard.Library - 2.1.0-prerelease.19457.5 * Disable ToolboxBitmatAttribute test in netfx (#40901) (#40908) * [release/3.0] Update dependencies from 4 repositories (#40929) * Update dependencies from https://github.com/dotnet/core-setup build 20190907.15 - Microsoft.NETCore.App - 3.0.0-rc2-19457-15 - Microsoft.NETCore.DotNetHost - 3.0.0-rc2-19457-15 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-rc2-19457-15 * Update dependencies from https://github.com/dotnet/arcade build 20190907.1 - Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19457.1 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19457.1 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19457.1 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19457.1 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19457.1 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19457.1 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19457.1 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19457.1 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19457.1 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19457.1 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19457.1 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19457.1 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19457.1 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19457.1 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190908.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190908.1 * Update dependencies from https://github.com/dotnet/standard build 20190908.3 - NETStandard.Library - 2.1.0-prerelease.19458.3 * [release/3.0] Update dependencies from 4 repositories (#40940) * Update dependencies from https://github.com/dotnet/core-setup build 20190908.11 - Microsoft.NETCore.App - 3.0.0-rc2-19458-11 - Microsoft.NETCore.DotNetHost - 3.0.0-rc2-19458-11 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-rc2-19458-11 * Update dependencies from https://github.com/dotnet/arcade build 20190908.2 - Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19458.2 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19458.2 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19458.2 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19458.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19458.2 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19458.2 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19458.2 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19458.2 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19458.2 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19458.2 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19458.2 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19458.2 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19458.2 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19458.2 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190909.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190909.1 * Update dependencies from https://github.com/dotnet/standard build 20190909.3 - NETStandard.Library - 2.1.0-prerelease.19459.3 * Add missing IAsyncDisposable interfaces to System.Data (#40872) Part of #35012 * Update dependencies from https://github.com/dotnet/coreclr build 20190909.3 (#40956) - Microsoft.NET.Sdk.IL - 3.0.0-rc2.19459.3 - Microsoft.NETCore.ILAsm - 3.0.0-rc2.19459.3 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-rc2.19459.3 * Fix TypeConverter for IComponent (#40837) (#40883) * .NET Core 3.0 Prev9 Intellisense nupkg version bump (#40963) (#40965) * [release/3.0] Update dependencies from 4 repositories (#40951) * Update dependencies from https://github.com/dotnet/standard build 20190909.4 - NETStandard.Library - 2.1.0-prerelease.19459.4 * Update dependencies from https://github.com/dotnet/core-setup build 20190909.40 - Microsoft.NETCore.App - 3.0.0-rc2-19459-40 - Microsoft.NETCore.DotNetHost - 3.0.0-rc2-19459-40 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-rc2-19459-40 * Update dependencies from https://github.com/dotnet/arcade build 20190909.10 - Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19459.10 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19459.10 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19459.10 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19459.10 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19459.10 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19459.10 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19459.10 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19459.10 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19459.10 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19459.10 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19459.10 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19459.10 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19459.10 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19459.10 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190910.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190910.1 * Add test for IComponent typeconverter register in TypeDescriptor (#40959) (#40977) * Update dependencies from https://github.com/dotnet/coreclr build 20190910.2 (#40984) - Microsoft.NET.Sdk.IL - 3.0.0-rc2.19460.2 - Microsoft.NETCore.ILAsm - 3.0.0-rc2.19460.2 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-rc2.19460.2 * Update dependencies from https://github.com/dotnet/coreclr build 20190910.4 (#41006) - Microsoft.NET.Sdk.IL - 3.0.0-rc2.19460.4 - Microsoft.NETCore.ILAsm - 3.0.0-rc2.19460.4 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-rc2.19460.4 * [release/3.0] Update dependencies from dotnet/arcade dotnet/standard (#40986) * Update dependencies from https://github.com/dotnet/arcade build 20190910.3 - Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19460.3 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19460.3 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19460.3 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19460.3 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19460.3 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19460.3 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19460.3 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19460.3 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19460.3 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19460.3 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19460.3 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19460.3 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19460.3 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19460.3 * Update dependencies from https://github.com/dotnet/standard build 20190910.4 - NETStandard.Library - 2.1.0-prerelease.19460.4 * Update dependencies from https://github.com/dotnet/standard build 20190910.5 - NETStandard.Library - 2.1.0-prerelease.19460.5 * [release/3.0] Avoid MemoryMarshal.Cast when transcoding from UTF-16 to UTF-8 while escaping in Utf8JsonWriter. (#40997) * Avoid MemoryMarshal.Cast when transcoding from UTF-16 to UTF-8 while escaping in Utf8JsonWriter. * Fix a typo in spacing within the test. * Guard against empty spans where an implementation of JavascriptEncoder might not handle null ptrs correctly. * Cleanup tests to avoid some duplication. * Some more test clean up. * Update dependencies from https://github.com/dotnet/coreclr build 20190910.8 (#41011) - Microsoft.NET.Sdk.IL - 3.0.0-rc2.19460.8 - Microsoft.NETCore.ILAsm - 3.0.0-rc2.19460.8 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-rc2.19460.8 * Update dependencies from https://github.com/dotnet/coreclr build 20190910.11 (#41014) - Microsoft.NET.Sdk.IL - 3.0.0-rc2.19460.11 - Microsoft.NETCore.ILAsm - 3.0.0-rc2.19460.11 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-rc2.19460.11 * [release/3.0] Update dependencies from 3 repositories (#41022) * Update dependencies from https://github.com/dotnet/core-setup build 20190910.02 - Microsoft.NETCore.App - 3.0.0-rc2-19460-02 - Microsoft.NETCore.DotNetHost - 3.0.0-rc2-19460-02 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-rc2-19460-02 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190911.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190911.1 * Update dependencies from https://github.com/dotnet/standard build 20190911.3 - NETStandard.Library - 2.1.0-prerelease.19461.3 * Update dependencies from https://github.com/dotnet/coreclr build 20190911.3 (#41035) - Microsoft.NET.Sdk.IL - 3.0.0-rc2.19461.3 - Microsoft.NETCore.ILAsm - 3.0.0-rc2.19461.3 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-rc2.19461.3 * adding version suffix as non empty for building release package versions * Update dependencies from https://github.com/dotnet/coreclr build 20190911.5 (#41045) - Microsoft.NET.Sdk.IL - 3.0.0-rc2.19461.5 - Microsoft.NETCore.ILAsm - 3.0.0-rc2.19461.5 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-rc2.19461.5 * [release/3.0] Update dependencies from 3 repositories (#41052) * Update dependencies from https://github.com/dotnet/arcade build 20190911.7 - Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19461.7 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19461.7 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19461.7 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19461.7 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19461.7 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19461.7 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19461.7 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19461.7 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19461.7 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19461.7 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19461.7 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19461.7 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19461.7 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19461.7 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190912.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190912.1 * Update dependencies from https://github.com/dotnet/standard build 20190912.2 - NETStandard.Library - 2.1.0-prerelease.19462.2 * Update dependencies from https://github.com/dotnet/standard build 20190912.4 - NETStandard.Library - 2.1.0-prerelease.19462.4 * Update dependencies from https://github.com/dotnet/coreclr build 20190912.2 (#41062) - Microsoft.NET.Sdk.IL - 3.0.0-rc2.19462.2 - Microsoft.NETCore.ILAsm - 3.0.0-rc2.19462.2 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-rc2.19462.2 * Update dependencies from https://github.com/dotnet/standard build 20190912.5 - NETStandard.Library - 2.1.0 * Stabilize package versions (#41076) * Update dependencies from https://github.com/dotnet/coreclr build 20190912.5 (#41081) - Microsoft.NET.Sdk.IL - 3.0.0-rc2.19462.5 - Microsoft.NETCore.ILAsm - 3.0.0-rc2.19462.5 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-rc2.19462.5
1 parent 08fddaa commit 3cba68f

16 files changed

+165
-24
lines changed

eng/Packaging.targets

+4
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@
3434
'$(_excludeCompile)' == 'true' AND
3535
'%(Dependency.Identity)' != '_._'" />
3636
</Target>
37+
38+
<PropertyGroup>
39+
<VersionSuffix>$(_PreReleaseLabel)$(_BuildNumberLabels)</VersionSuffix>
40+
</PropertyGroup>
3741
</Project>

eng/Version.Details.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<Uri>https://github.com/dotnet/arcade</Uri>
9595
<Sha>8eb29ba860a3cfcfe68f9a8256caa7efc1f1aaba</Sha>
9696
</Dependency>
97-
<Dependency Name="optimization.windows_nt-x64.IBC.CoreFx" Version="99.99.99-master-20190905.1">
97+
<Dependency Name="optimization.windows_nt-x64.IBC.CoreFx" Version="99.99.99-master-20190912.1">
9898
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
9999
<Sha>48fd58c24cddbc6c0b0de1c00204aae1170f4864</Sha>
100100
</Dependency>

eng/Versions.props

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
<!-- Always use shipping version instead of dummy version -->
99
<DotNetUseShippingVersions>true</DotNetUseShippingVersions>
1010
<PreReleaseVersionLabel>preview1</PreReleaseVersionLabel>
11+
<!--
12+
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
13+
-->
14+
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
15+
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
1116
<!-- Opt-in repo features -->
1217
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
1318
<UsingToolIbcOptimization>true</UsingToolIbcOptimization>
@@ -54,7 +59,7 @@
5459
<!-- Standard dependencies -->
5560
<NETStandardLibraryPackageVersion>2.1.0</NETStandardLibraryPackageVersion>
5661
<!-- dotnet-optimization dependencies -->
57-
<optimizationwindows_ntx64IBCCoreFxPackageVersion>99.99.99-master-20190905.1</optimizationwindows_ntx64IBCCoreFxPackageVersion>
62+
<optimizationwindows_ntx64IBCCoreFxPackageVersion>99.99.99-master-20190912.1</optimizationwindows_ntx64IBCCoreFxPackageVersion>
5863
<!-- sni -->
5964
<RuntimeWinX64RuntimeNativeSystemDataSqlClientSniPackageVersion>4.4.0</RuntimeWinX64RuntimeNativeSystemDataSqlClientSniPackageVersion>
6065
<RuntimeNativeSystemDataSqlClientSniPackageVersion>4.4.0</RuntimeNativeSystemDataSqlClientSniPackageVersion>
@@ -77,7 +82,7 @@
7782
<CoverletConsolePackageVersion>1.5.0</CoverletConsolePackageVersion>
7883
<DotNetReportGeneratorGlobalToolPackageVersion>4.1.4</DotNetReportGeneratorGlobalToolPackageVersion>
7984
<!-- Docs -->
80-
<MicrosoftPrivateIntellisensePackageVersion>3.0.0-preview8-190819-0</MicrosoftPrivateIntellisensePackageVersion>
85+
<MicrosoftPrivateIntellisensePackageVersion>3.0.0-preview9-190909-1</MicrosoftPrivateIntellisensePackageVersion>
8186
<!-- ILLink -->
8287
<ILLinkTasksPackageVersion>0.1.5-preview-1461378</ILLinkTasksPackageVersion>
8388
</PropertyGroup>

src/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs

+1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ internal ReflectTypeDescriptionProvider()
136136
//
137137
[typeof(Array)] = typeof(ArrayConverter),
138138
[typeof(ICollection)] = typeof(CollectionConverter),
139+
[typeof(IComponent)] = typeof(ComponentConverter),
139140
[typeof(Enum)] = typeof(EnumConverter),
140141
[s_intrinsicNullableKey] = typeof(NullableConverter),
141142
});

src/System.ComponentModel.TypeConverter/tests/TypeDescriptorTests.netcoreapp.cs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public partial class TypeDescriptorTests
1010
{
1111
[Theory]
1212
[InlineData(typeof(Version), typeof(VersionConverter))]
13+
[InlineData(typeof(IComponent), typeof(ComponentConverter))]
1314
public static void GetConverter_NetCoreApp(Type targetType, Type resultConverterType) =>
1415
GetConverter(targetType, resultConverterType);
1516
}

src/System.Data.Common/ref/System.Data.Common.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,7 @@ protected DbColumn() { }
17961796
public int? NumericScale { get { throw null; } protected set { } }
17971797
public string UdtAssemblyQualifiedName { get { throw null; } protected set { } }
17981798
}
1799-
public abstract partial class DbCommand : System.ComponentModel.Component, System.Data.IDbCommand, System.IDisposable
1799+
public abstract partial class DbCommand : System.ComponentModel.Component, System.Data.IDbCommand, System.IDisposable, System.IAsyncDisposable
18001800
{
18011801
protected DbCommand() { }
18021802
[System.ComponentModel.DefaultValueAttribute("")]
@@ -1893,7 +1893,7 @@ protected void RowUpdatingHandler(System.Data.Common.RowUpdatingEventArgs rowUpd
18931893
protected abstract void SetRowUpdatingHandler(System.Data.Common.DbDataAdapter adapter);
18941894
public virtual string UnquoteIdentifier(string quotedIdentifier) { throw null; }
18951895
}
1896-
public abstract partial class DbConnection : System.ComponentModel.Component, System.Data.IDbConnection, System.IDisposable
1896+
public abstract partial class DbConnection : System.ComponentModel.Component, System.Data.IDbConnection, System.IDisposable, System.IAsyncDisposable
18971897
{
18981898
protected DbConnection() { }
18991899
[System.ComponentModel.DefaultValueAttribute("")]
@@ -2050,7 +2050,7 @@ protected virtual void TerminateBatching() { }
20502050
public int Update(System.Data.DataSet dataSet, string srcTable) { throw null; }
20512051
public int Update(System.Data.DataTable dataTable) { throw null; }
20522052
}
2053-
public abstract partial class DbDataReader : System.MarshalByRefObject, System.Collections.IEnumerable, System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable
2053+
public abstract partial class DbDataReader : System.MarshalByRefObject, System.Collections.IEnumerable, System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable, System.IAsyncDisposable
20542054
{
20552055
protected DbDataReader() { }
20562056
public abstract int Depth { get; }
@@ -2353,7 +2353,7 @@ public sealed partial class DbProviderSpecificTypePropertyAttribute : System.Att
23532353
public DbProviderSpecificTypePropertyAttribute(bool isProviderSpecificTypeProperty) { }
23542354
public bool IsProviderSpecificTypeProperty { get { throw null; } }
23552355
}
2356-
public abstract partial class DbTransaction : System.MarshalByRefObject, System.Data.IDbTransaction, System.IDisposable
2356+
public abstract partial class DbTransaction : System.MarshalByRefObject, System.Data.IDbTransaction, System.IDisposable, System.IAsyncDisposable
23572357
{
23582358
protected DbTransaction() { }
23592359
public System.Data.Common.DbConnection Connection { get { throw null; } }

src/System.Data.Common/src/System/Data/Common/DbCommand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace System.Data.Common
1010
{
11-
public abstract class DbCommand : Component, IDbCommand
11+
public abstract class DbCommand : Component, IDbCommand, IAsyncDisposable
1212
{
1313
protected DbCommand() : base()
1414
{

src/System.Data.Common/src/System/Data/Common/DbConnection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace System.Data.Common
1010
{
11-
public abstract class DbConnection : Component, IDbConnection
11+
public abstract class DbConnection : Component, IDbConnection, IAsyncDisposable
1212
{
1313
#pragma warning disable 649 // ignore unassigned field warning
1414
internal bool _suppressStateChangeForReconnection;

src/System.Data.Common/src/System/Data/Common/DbDataReader.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace System.Data.Common
1212
{
13-
public abstract class DbDataReader : MarshalByRefObject, IDataReader, IEnumerable
13+
public abstract class DbDataReader : MarshalByRefObject, IDataReader, IEnumerable, IAsyncDisposable
1414
{
1515
protected DbDataReader() : base() { }
1616

src/System.Data.Common/src/System/Data/Common/DbTransaction.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace System.Data.Common
99
{
10-
public abstract class DbTransaction : MarshalByRefObject, IDbTransaction
10+
public abstract class DbTransaction : MarshalByRefObject, IDbTransaction, IAsyncDisposable
1111
{
1212
protected DbTransaction() : base() { }
1313

src/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static IEnumerable<object[]> Ctor_FileName_TestData()
4646
[ActiveIssue(20884, TestPlatforms.AnyUnix)]
4747
[ConditionalTheory(Helpers.IsDrawingSupported)]
4848
[MemberData(nameof(Ctor_FileName_TestData))]
49+
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
4950
public void Ctor_FileName(string fileName, Size size)
5051
{
5152
var attribute = new ToolboxBitmapAttribute(fileName);

src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs

+8-3
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,18 @@ public static int NeedsEscaping(ReadOnlySpan<byte> value, JavaScriptEncoder enco
7979
return idx;
8080
}
8181

82-
public static int NeedsEscaping(ReadOnlySpan<char> value, JavaScriptEncoder encoder)
82+
public static unsafe int NeedsEscaping(ReadOnlySpan<char> value, JavaScriptEncoder encoder)
8383
{
8484
int idx;
8585

86-
if (encoder != null)
86+
// Some implementations of JavascriptEncoder.FindFirstCharacterToEncode may not accept
87+
// null pointers and gaurd against that. Hence, check up-front and fall down to return -1.
88+
if (encoder != null && !value.IsEmpty)
8789
{
88-
idx = encoder.FindFirstCharacterToEncodeUtf8(MemoryMarshal.Cast<char, byte>(value));
90+
fixed (char* ptr = value)
91+
{
92+
idx = encoder.FindFirstCharacterToEncode(ptr, value.Length);
93+
}
8994
goto Return;
9095
}
9196

src/System.Text.Json/tests/Serialization/Value.WriteTests.cs

+12
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ public static void WriteStringWithRelaxedEscaper()
2222
Assert.NotEqual(expected, JsonSerializer.Serialize(inputString));
2323
}
2424

25+
// https://github.com/dotnet/corefx/issues/40979
26+
[Fact]
27+
public static void EscapingShouldntStackOverflow_40979()
28+
{
29+
var test = new { Name = "\u6D4B\u8A6611" };
30+
31+
var options = new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
32+
string result = JsonSerializer.Serialize(test, options);
33+
34+
Assert.Equal("{\"name\":\"\u6D4B\u8A6611\"}", result);
35+
}
36+
2537
[Fact]
2638
public static void WritePrimitives()
2739
{

src/System.Text.Json/tests/Utf8JsonWriterTests.cs

+122
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,128 @@ public void CantWriteToNonWritableStream(bool formatted, bool skipValidation)
5656
Assert.Throws<ArgumentException>(() => new Utf8JsonWriter(stream, options));
5757
}
5858

59+
[Fact]
60+
public static void WritingNullStringsWithCustomEscaping()
61+
{
62+
var writerOptions = new JsonWriterOptions();
63+
WriteNullStringsHelper(writerOptions);
64+
65+
writerOptions = new JsonWriterOptions { Encoder = JavaScriptEncoder.Default };
66+
WriteNullStringsHelper(writerOptions);
67+
68+
writerOptions = new JsonWriterOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping };
69+
WriteNullStringsHelper(writerOptions);
70+
}
71+
72+
[Fact]
73+
public static void WritingNullStringsWithBuggyJavascriptEncoder()
74+
{
75+
var writerOptions = new JsonWriterOptions { Encoder = new BuggyJavaScriptEncoder() };
76+
WriteNullStringsHelper(writerOptions);
77+
}
78+
79+
private static void WriteNullStringsHelper(JsonWriterOptions writerOptions)
80+
{
81+
var output = new ArrayBufferWriter<byte>();
82+
string str = null;
83+
84+
using (var writer = new Utf8JsonWriter(output, writerOptions))
85+
{
86+
writer.WriteStringValue(str);
87+
}
88+
JsonTestHelper.AssertContents("null", output);
89+
90+
output.Clear();
91+
using (var writer = new Utf8JsonWriter(output, writerOptions))
92+
{
93+
writer.WriteStringValue(str.AsSpan());
94+
}
95+
JsonTestHelper.AssertContents("\"\"", output);
96+
97+
byte[] utf8Str = null;
98+
output.Clear();
99+
using (var writer = new Utf8JsonWriter(output, writerOptions))
100+
{
101+
writer.WriteStringValue(utf8Str.AsSpan());
102+
}
103+
JsonTestHelper.AssertContents("\"\"", output);
104+
105+
JsonEncodedText jsonText = JsonEncodedText.Encode(utf8Str.AsSpan());
106+
output.Clear();
107+
using (var writer = new Utf8JsonWriter(output, writerOptions))
108+
{
109+
writer.WriteStringValue(jsonText);
110+
}
111+
JsonTestHelper.AssertContents("\"\"", output);
112+
}
113+
114+
public class BuggyJavaScriptEncoder : JavaScriptEncoder
115+
{
116+
public override int MaxOutputCharactersPerInputCharacter => throw new NotImplementedException();
117+
118+
public override unsafe int FindFirstCharacterToEncode(char* text, int textLength)
119+
{
120+
// Access the text pointer even though it might be null and text length is 0.
121+
return *text;
122+
}
123+
124+
public override unsafe bool TryEncodeUnicodeScalar(int unicodeScalar, char* buffer, int bufferLength, out int numberOfCharactersWritten)
125+
{
126+
numberOfCharactersWritten = 0;
127+
return false;
128+
}
129+
130+
public override bool WillEncode(int unicodeScalar) => false;
131+
}
132+
133+
[Fact]
134+
public static void WritingStringsWithCustomEscaping()
135+
{
136+
var output = new ArrayBufferWriter<byte>();
137+
var writerOptions = new JsonWriterOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping };
138+
139+
using (var writer = new Utf8JsonWriter(output))
140+
{
141+
writer.WriteStringValue("\u6D4B\u8A6611");
142+
}
143+
JsonTestHelper.AssertContents("\"\\u6D4B\\u8A6611\"", output);
144+
145+
output.Clear();
146+
using (var writer = new Utf8JsonWriter(output, writerOptions))
147+
{
148+
writer.WriteStringValue("\u6D4B\u8A6611");
149+
}
150+
JsonTestHelper.AssertContents("\"\u6D4B\u8A6611\"", output);
151+
152+
output.Clear();
153+
using (var writer = new Utf8JsonWriter(output))
154+
{
155+
writer.WriteStringValue("\u00E9\"");
156+
}
157+
JsonTestHelper.AssertContents("\"\\u00E9\\u0022\"", output);
158+
159+
output.Clear();
160+
using (var writer = new Utf8JsonWriter(output, writerOptions))
161+
{
162+
writer.WriteStringValue("\u00E9\"");
163+
}
164+
JsonTestHelper.AssertContents("\"\u00E9\\\"\"", output);
165+
166+
output.Clear();
167+
using (var writer = new Utf8JsonWriter(output))
168+
{
169+
writer.WriteStringValue("\u2020\"");
170+
}
171+
JsonTestHelper.AssertContents("\"\\u2020\\u0022\"", output);
172+
173+
output.Clear();
174+
using (var writer = new Utf8JsonWriter(output, writerOptions))
175+
{
176+
writer.WriteStringValue("\u2020\"");
177+
}
178+
JsonTestHelper.AssertContents("\"\u2020\\\"\"", output);
179+
}
180+
59181
[Fact]
60182
public void WriteJsonWritesToIBWOnDemand_Dispose()
61183
{

src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute'
33
CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
44
CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
55
CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation.
6-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.DataTableReader' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
7-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbCommand' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
8-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbConnection' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
9-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbDataReader' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
10-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbTransaction' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
116
CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false, AllowMultiple=false)]' in the implementation.
127
CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlAnyAttributeAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation.
138
CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlNamespaceDeclarationsAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation.

src/shims/ApiCompatBaseline.uap.netstandardOnly.txt

-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ TypesMustExist : Type 'System.Diagnostics.Tracing.PollingCounter' does not exist
1616
TypesMustExist : Type 'System.IO.Compression.BrotliDecoder' does not exist in the implementation but it does exist in the contract.
1717
TypesMustExist : Type 'System.IO.Compression.BrotliEncoder' does not exist in the implementation but it does exist in the contract.
1818
TypesMustExist : Type 'System.IO.Compression.BrotliStream' does not exist in the implementation but it does exist in the contract.
19-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.DataTableReader' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
20-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbCommand' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
21-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbConnection' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
22-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbDataReader' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
23-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbTransaction' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
2419
CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false, AllowMultiple=false)]' in the implementation.
2520
CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlAnyAttributeAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation.
2621
CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlNamespaceDeclarationsAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation.

0 commit comments

Comments
 (0)