From d266e0a955e6818807d6e68b092eed12bd54d01f Mon Sep 17 00:00:00 2001 From: Davoud Date: Tue, 27 Feb 2024 14:19:11 -0800 Subject: [PATCH 1/2] Fix | ExecuteReaderAsync API return type in ref file --- .../ref/Microsoft.Data.SqlClient.Batch.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs index 1b66106439..77a695e381 100644 --- a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs +++ b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs @@ -44,7 +44,7 @@ public class SqlBatch : System.Data.Common.DbBatch /// public Microsoft.Data.SqlClient.SqlDataReader ExecuteReader() => throw null; /// - public Microsoft.Data.SqlClient.SqlDataReader ExecuteReaderAsync() => throw null; + public System.Threading.Tasks.Task ExecuteReaderAsync() => throw null; /// public override object ExecuteScalar() => throw null; /// From 25dec6e1797f2a3f62483d31e46072b8c21e09c0 Mon Sep 17 00:00:00 2001 From: Davoud Date: Tue, 27 Feb 2024 19:00:44 -0800 Subject: [PATCH 2/2] Fix | ExecuteReaderAsync API xml and ref files --- doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml | 5 +++++ .../ref/Microsoft.Data.SqlClient.Batch.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml index 9ce061e042..e7e60639e8 100644 --- a/doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml +++ b/doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml @@ -111,6 +111,7 @@ The following example creates a an + A token to cancel the asynchronous operation. An asynchronous version of @@ -122,6 +123,10 @@ The following example creates a an . Exceptions will be reported via the returned Task object. + A task representing the asynchronous operation. + An error occurred while executing the batch. + The value is invalid. + The cancellation token was canceled. This exception is stored into the returned task. Gets the collection of objects. diff --git a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs index 77a695e381..411c88a7f2 100644 --- a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs +++ b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs @@ -44,7 +44,7 @@ public class SqlBatch : System.Data.Common.DbBatch /// public Microsoft.Data.SqlClient.SqlDataReader ExecuteReader() => throw null; /// - public System.Threading.Tasks.Task ExecuteReaderAsync() => throw null; + public new System.Threading.Tasks.Task ExecuteReaderAsync(System.Threading.CancellationToken cancellationToken = default) => throw null; /// public override object ExecuteScalar() => throw null; ///