Skip to content

Commit faf9b95

Browse files
Fix | ExecuteReaderAsync API xml and ref files (#2373)
1 parent 51ef22c commit faf9b95

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml

+5
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> an
111111
</remarks>
112112
</ExecuteReader>
113113
<ExecuteReaderAsync>
114+
<param name="cancellationToken">A token to cancel the asynchronous operation.</param>
114115
<summary>
115116
An asynchronous version of
116117
<see cref="M:Microsoft.Data.SqlClient.SqlBatch.ExecuteReader"/>
@@ -122,6 +123,10 @@ The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> an
122123
<see cref="T:Microsoft.Data.SqlClient.SqlDataReader"/>.
123124
Exceptions will be reported via the returned Task object.
124125
</summary>
126+
<returns>A task representing the asynchronous operation.</returns>
127+
<exception cref="T:Microsoft.Data.SqlClient.SqlException">An error occurred while executing the batch.</exception>
128+
<exception cref="T:System.ArgumentException">The <see cref="T:System.Data.CommandBehavior" /> value is invalid.</exception>
129+
<exception cref="T:System.OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
125130
</ExecuteReaderAsync>
126131
<DbBatchCommands>
127132
<summary>Gets the collection of <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand" /> objects.</summary>

src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class SqlBatch : System.Data.Common.DbBatch
4444
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteReader/*'/>
4545
public Microsoft.Data.SqlClient.SqlDataReader ExecuteReader() => throw null;
4646
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteReaderAsync/*'/>
47-
public System.Threading.Tasks.Task<Microsoft.Data.SqlClient.SqlDataReader> ExecuteReaderAsync() => throw null;
47+
public new System.Threading.Tasks.Task<Microsoft.Data.SqlClient.SqlDataReader> ExecuteReaderAsync(System.Threading.CancellationToken cancellationToken = default) => throw null;
4848
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteScalar/*'/>
4949
public override object ExecuteScalar() => throw null;
5050
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteScalarAsync/*'/>

0 commit comments

Comments
 (0)