Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Commit

Permalink
Add async methods in System.Data.Common, implement IAsyncDisposable (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
roji authored and wtgodbe committed Jul 2, 2019
1 parent faff161 commit 84650d1
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 10 deletions.
21 changes: 17 additions & 4 deletions src/netstandard/ref/System.Data.Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ protected DbColumn() { }
public System.Nullable<int> NumericScale { get { throw null; } protected set { } }
public string UdtAssemblyQualifiedName { get { throw null; } protected set { } }
}
public abstract partial class DbCommand : System.ComponentModel.Component, System.Data.IDbCommand, System.IDisposable
public abstract partial class DbCommand : System.ComponentModel.Component, System.Data.IDbCommand, System.IDisposable, System.IAsyncDisposable
{
protected DbCommand() { }
[System.ComponentModel.DefaultValueAttribute("")]
Expand Down Expand Up @@ -260,9 +260,11 @@ protected DbCommand() { }
public System.Threading.Tasks.Task<object> ExecuteScalarAsync() { throw null; }
public virtual System.Threading.Tasks.Task<object> ExecuteScalarAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public abstract void Prepare();
public virtual System.Threading.Tasks.Task PrepareAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; }
System.Data.IDbDataParameter System.Data.IDbCommand.CreateParameter() { throw null; }
System.Data.IDataReader System.Data.IDbCommand.ExecuteReader() { throw null; }
System.Data.IDataReader System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior behavior) { throw null; }
public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
}
public abstract partial class DbCommandBuilder : System.ComponentModel.Component
{
Expand Down Expand Up @@ -303,7 +305,7 @@ protected void RowUpdatingHandler(System.Data.Common.RowUpdatingEventArgs rowUpd
protected abstract void SetRowUpdatingHandler(System.Data.Common.DbDataAdapter adapter);
public virtual string UnquoteIdentifier(string quotedIdentifier) { throw null; }
}
public abstract partial class DbConnection : System.ComponentModel.Component, System.Data.IDbConnection, System.IDisposable
public abstract partial class DbConnection : System.ComponentModel.Component, System.Data.IDbConnection, System.IDisposable, System.IAsyncDisposable
{
protected DbConnection() { }
[System.ComponentModel.DefaultValueAttribute("")]
Expand All @@ -324,7 +326,9 @@ public virtual event System.Data.StateChangeEventHandler StateChange { add { } r
public System.Data.Common.DbTransaction BeginTransaction() { throw null; }
public System.Data.Common.DbTransaction BeginTransaction(System.Data.IsolationLevel isolationLevel) { throw null; }
public abstract void ChangeDatabase(string databaseName);
public virtual System.Threading.Tasks.Task ChangeDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public abstract void Close();
public virtual System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; }
public System.Data.Common.DbCommand CreateCommand() { throw null; }
protected abstract System.Data.Common.DbCommand CreateDbCommand();
public virtual void EnlistTransaction(System.Transactions.Transaction transaction) { }
Expand All @@ -337,7 +341,11 @@ protected virtual void OnStateChange(System.Data.StateChangeEventArgs stateChang
public virtual System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
System.Data.IDbTransaction System.Data.IDbConnection.BeginTransaction() { throw null; }
System.Data.IDbTransaction System.Data.IDbConnection.BeginTransaction(System.Data.IsolationLevel isolationLevel) { throw null; }
protected virtual System.Threading.Tasks.ValueTask<DbTransaction> BeginDbTransactionAsync(IsolationLevel isolationLevel, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.ValueTask<DbTransaction> BeginTransactionAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; }
public System.Threading.Tasks.ValueTask<DbTransaction> BeginTransactionAsync(IsolationLevel isolationLevel, System.Threading.CancellationToken cancellationToken = default) { throw null; }
System.Data.IDbCommand System.Data.IDbConnection.CreateCommand() { throw null; }
public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
}
public partial class DbConnectionStringBuilder : System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable, System.ComponentModel.ICustomTypeDescriptor
{
Expand Down Expand Up @@ -454,7 +462,7 @@ protected virtual void TerminateBatching() { }
public int Update(System.Data.DataSet dataSet, string srcTable) { throw null; }
public int Update(System.Data.DataTable dataTable) { throw null; }
}
public abstract partial class DbDataReader : System.MarshalByRefObject, System.Collections.IEnumerable, System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable
public abstract partial class DbDataReader : System.MarshalByRefObject, System.Collections.IEnumerable, System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable, System.IAsyncDisposable
{
protected DbDataReader() { }
public abstract int Depth { get; }
Expand All @@ -466,9 +474,11 @@ protected DbDataReader() { }
public abstract int RecordsAffected { get; }
public virtual int VisibleFieldCount { get { throw null; } }
public virtual void Close() { }
public virtual System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
public abstract bool GetBoolean(int ordinal);
public abstract byte GetByte(int ordinal);
public abstract long GetBytes(int ordinal, long dataOffset, byte[] buffer, int bufferOffset, int length);
Expand Down Expand Up @@ -756,17 +766,20 @@ public sealed partial class DbProviderSpecificTypePropertyAttribute : System.Att
public DbProviderSpecificTypePropertyAttribute(bool isProviderSpecificTypeProperty) { }
public bool IsProviderSpecificTypeProperty { get { throw null; } }
}
public abstract partial class DbTransaction : System.MarshalByRefObject, System.Data.IDbTransaction, System.IDisposable
public abstract partial class DbTransaction : System.MarshalByRefObject, System.Data.IDbTransaction, System.IDisposable, System.IAsyncDisposable
{
protected DbTransaction() { }
public System.Data.Common.DbConnection Connection { get { throw null; } }
protected abstract System.Data.Common.DbConnection DbConnection { get; }
public abstract System.Data.IsolationLevel IsolationLevel { get; }
System.Data.IDbConnection System.Data.IDbTransaction.Connection { get { throw null; } }
public abstract void Commit();
public virtual System.Threading.Tasks.Task CommitAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; }
public void Dispose() { }
public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
protected virtual void Dispose(bool disposing) { }
public abstract void Rollback();
public virtual System.Threading.Tasks.Task RollbackAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; }
}
public enum GroupByBehavior
{
Expand Down
20 changes: 19 additions & 1 deletion src/netstandard/src/ApiCompatBaseline.monoandroid.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,27 @@ TypeCannotChangeClassification : Type 'System.ComponentModel.Design.Serializatio
CannotChangeAttribute : Attribute 'System.ObsoleteAttribute' on 'System.ComponentModel.Design.Serialization.RootDesignerSerializerAttribute' changed from '[ObsoleteAttribute("This attribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)). https://go.microsoft.com/fwlink/?linkid=14202")]' in the contract to '[ObsoleteAttribute("This attribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)). http://go.microsoft.com/fwlink/?linkid=14202")]' in the implementation.
CannotRemoveAttribute : Attribute 'System.ComponentModel.ToolboxItemAttribute' exists on 'System.Data.DataSet' in the contract but not the implementation.
CannotChangeAttribute : Attribute 'System.ObsoleteAttribute' on 'System.Data.DataSysDescriptionAttribute' changed from '[ObsoleteAttribute("DataSysDescriptionAttribute has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202", false)]' in the contract to '[ObsoleteAttribute("DataSysDescriptionAttribute has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202", false)]' in the implementation.
CannotRemoveBaseTypeOrInterface : Type 'System.Data.DataTableReader' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbCommand' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Data.Common.DbCommand.DisposeAsync()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbCommand.PrepareAsync(System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbConnection' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Data.Common.DbConnection.BeginDbTransactionAsync(System.Data.IsolationLevel, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbConnection.BeginTransactionAsync(System.Data.IsolationLevel, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbConnection.BeginTransactionAsync(System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbConnection.ChangeDatabaseAsync(System.String, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbConnection.CloseAsync(System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbConnection.DisposeAsync()' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbDataReader' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Data.Common.DbDataReader.CloseAsync(System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbDataReader.DisposeAsync()' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Data.Common.DbProviderFactories' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbProviderFactory.CanCreateCommandBuilder.get()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbProviderFactory.CanCreateDataAdapter.get()' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Data.Common.DbTransaction' does not implement interface 'System.IAsyncDisposable' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Data.Common.DbTransaction.CommitAsync(System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbTransaction.DisposeAsync()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Data.Common.DbTransaction.RollbackAsync(System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Diagnostics.ProcessStartInfo.ArgumentList.get()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Diagnostics.ProcessStartInfo.StandardInputEncoding.get()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Diagnostics.ProcessStartInfo.StandardInputEncoding.set(System.Text.Encoding)' does not exist in the implementation but it does exist in the contract.
Expand Down Expand Up @@ -1026,4 +1044,4 @@ CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xm
CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlChoiceIdentifierAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the implementation.
CannotRemoveBaseTypeOrInterface : Type 'System.Xml.Serialization.XmlSchemaImporter' does not inherit from base type 'System.Xml.Serialization.SchemaImporter' in the implementation but it does in the contract.
CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlSerializerAssemblyAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct)]' in the implementation.
Total Issues: 1027
Total Issues: 1045
Loading

0 comments on commit 84650d1

Please sign in to comment.