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