Skip to content

Commit d931095

Browse files
authored
Add missing IAsyncDisposable interfaces to System.Data.Common (dotnet#33265)
1 parent 931543e commit d931095

6 files changed

Lines changed: 8 additions & 13 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ protected DbColumn() { }
17861786
public int? NumericScale { get { throw null; } protected set { } }
17871787
public string UdtAssemblyQualifiedName { get { throw null; } protected set { } }
17881788
}
1789-
public abstract partial class DbCommand : System.ComponentModel.Component, System.Data.IDbCommand, System.IDisposable
1789+
public abstract partial class DbCommand : System.ComponentModel.Component, System.Data.IDbCommand, System.IDisposable, System.IAsyncDisposable
17901790
{
17911791
protected DbCommand() { }
17921792
[System.ComponentModel.DefaultValueAttribute("")]
@@ -1883,7 +1883,7 @@ protected void RowUpdatingHandler(System.Data.Common.RowUpdatingEventArgs rowUpd
18831883
protected abstract void SetRowUpdatingHandler(System.Data.Common.DbDataAdapter adapter);
18841884
public virtual string UnquoteIdentifier(string quotedIdentifier) { throw null; }
18851885
}
1886-
public abstract partial class DbConnection : System.ComponentModel.Component, System.Data.IDbConnection, System.IDisposable
1886+
public abstract partial class DbConnection : System.ComponentModel.Component, System.Data.IDbConnection, System.IDisposable, System.IAsyncDisposable
18871887
{
18881888
protected DbConnection() { }
18891889
[System.ComponentModel.DefaultValueAttribute("")]
@@ -2040,7 +2040,7 @@ protected virtual void TerminateBatching() { }
20402040
public int Update(System.Data.DataSet dataSet, string srcTable) { throw null; }
20412041
public int Update(System.Data.DataTable dataTable) { throw null; }
20422042
}
2043-
public abstract partial class DbDataReader : System.MarshalByRefObject, System.Collections.IEnumerable, System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable
2043+
public abstract partial class DbDataReader : System.MarshalByRefObject, System.Collections.IEnumerable, System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable, System.IAsyncDisposable
20442044
{
20452045
protected DbDataReader() { }
20462046
public abstract int Depth { get; }
@@ -2343,7 +2343,7 @@ public sealed partial class DbProviderSpecificTypePropertyAttribute : System.Att
23432343
public DbProviderSpecificTypePropertyAttribute(bool isProviderSpecificTypeProperty) { }
23442344
public bool IsProviderSpecificTypeProperty { get { throw null; } }
23452345
}
2346-
public abstract partial class DbTransaction : System.MarshalByRefObject, System.Data.IDbTransaction, System.IDisposable
2346+
public abstract partial class DbTransaction : System.MarshalByRefObject, System.Data.IDbTransaction, System.IDisposable, System.IAsyncDisposable
23472347
{
23482348
protected DbTransaction() { }
23492349
public System.Data.Common.DbConnection Connection { get { throw null; } }

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

Lines changed: 1 addition & 1 deletion
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/libraries/System.Data.Common/src/System/Data/Common/DbConnection.cs

Lines changed: 1 addition & 1 deletion
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/libraries/System.Data.Common/src/System/Data/Common/DbDataReader.cs

Lines changed: 1 addition & 1 deletion
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/libraries/System.Data.Common/src/System/Data/Common/DbTransaction.cs

Lines changed: 1 addition & 1 deletion
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/libraries/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ CannotRemoveAttribute : Attribute 'System.ComponentModel.BrowsableAttribute' exi
1111
CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.ComponentModel.BackgroundWorker.WorkerReportsProgress' in the contract but not the implementation.
1212
CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation' in the contract but not the implementation.
1313
CannotRemoveAttribute : Attribute 'System.ComponentModel.BrowsableAttribute' exists on 'System.ComponentModel.RunWorkerCompletedEventArgs.UserState' in the contract but not the implementation.
14-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.DataTableReader' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
15-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbCommand' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
16-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbConnection' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
17-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbDataReader' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
18-
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbTransaction' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
1914
CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
2015
CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
2116
CannotRemoveAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' exists on 'System.Diagnostics.Process.BasePriority' in the contract but not the implementation.

0 commit comments

Comments
 (0)