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

Commit 6aa4a44

Browse files
rojidanmoseley
authored andcommitted
Add missing IAsyncDisposable interfaces to System.Data (#40872)
Part of #35012
1 parent 1d383de commit 6aa4a44

7 files changed

+8
-18
lines changed

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/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)