From a2b77ca2c6b57241ea1099f7539ff7eaa1de658b Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Tue, 27 Aug 2019 10:15:12 +0200 Subject: [PATCH] Additional tweaks to new System.Data async APIs * Fixes to PrepareAsync * Made cancellation token description more consistent and added note where default values are present. * Changed default value for cancellation tokens to be CancellationToken.None instead of null --- xml/System.Data.Common/DbCommand.xml | 14 +++++++------- xml/System.Data.Common/DbConnection.xml | 6 +++--- xml/System.Data.Common/DbTransaction.xml | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/xml/System.Data.Common/DbCommand.xml b/xml/System.Data.Common/DbCommand.xml index ddcaf4d7916..15b0e808837 100644 --- a/xml/System.Data.Common/DbCommand.xml +++ b/xml/System.Data.Common/DbCommand.xml @@ -732,7 +732,7 @@ Options for statement execution and data retrieval. - The token to monitor for cancellation requests. + A token to cancel the asynchronous operation. Providers should implement this method to provide a non-default implementation for overloads. The default implementation invokes the synchronous method and returns a completed task, blocking the calling thread. The default implementation will return a cancelled task if passed an already cancelled cancellation token. Exceptions thrown by ExecuteReader will be communicated via the returned Task Exception property. @@ -898,7 +898,7 @@ - The token to monitor for cancellation requests. + A token to cancel the asynchronous operation. This is the asynchronous version of . Providers should override with an appropriate implementation. The cancellation token may optionally be ignored. The default implementation invokes the synchronous method and returns a completed task, blocking the calling thread. The default implementation will return a cancelled task if passed an already cancelled cancellation token. Exceptions thrown by will be communicated via the returned Task Exception property. @@ -1151,7 +1151,7 @@ - The token to monitor for cancellation requests. + A token to cancel the asynchronous operation. An asynchronous version of , which executes the against the and returns a . This method propagates a notification that operations should be canceled. Invokes . @@ -1202,7 +1202,7 @@ One of the enumeration values that specifies the command behavior. - The token to monitor for cancellation requests. + A token to cancel the asynchronous operation. Invokes . A task representing the asynchronous operation. @@ -1362,7 +1362,7 @@ - The token to monitor for cancellation requests. + A token to cancel the asynchronous operation. This is the asynchronous version of . Providers should override with an appropriate implementation. The cancellation token may optionally be ignored. The default implementation invokes the synchronous method and returns a completed task, blocking the calling thread. The default implementation will return a cancelled task if passed an already cancelled cancellation token. Exceptions thrown by ExecuteScalar will be communicated via the returned Task Exception property. @@ -1495,7 +1495,7 @@ - To be added. + An optional token to cancel the asynchronous operation. The default value is . Asynchronously creates a prepared (or compiled) version of the command on the data source. A representing the asynchronous operation. @@ -1506,7 +1506,7 @@ Data providers that support [asynchronous programming](~/docs/framework/data/adonet/asynchronous-programming.md) should override the default implementation using asynchronous I/O operations. - If the property is set to `TableDirect`, `Prepare` does nothing. If is set to `StoredProcedure`, the call to `Prepare` should succeed, although it may result in a no-op. + If the property is set to `TableDirect`, `PrepareAsync` does nothing. If is set to `StoredProcedure`, the call to `PrepareAsync` should succeed, although it may result in a no-op. ]]> diff --git a/xml/System.Data.Common/DbConnection.xml b/xml/System.Data.Common/DbConnection.xml index 44184593b27..a26ffdadf82 100644 --- a/xml/System.Data.Common/DbConnection.xml +++ b/xml/System.Data.Common/DbConnection.xml @@ -294,7 +294,7 @@ - A token to cancel the asynchronous operation. + An optional token to cancel the asynchronous operation. The default value is . Asynchronously begins a database transaction. A task whose property is an object representing the new transaction. @@ -337,7 +337,7 @@ One of the enumeration values that specifies the isolation level for the transaction to use. - A token to cancel the asynchronous operation. + An optional token to cancel the asynchronous operation. The default value is . Asynchronously begins a database transaction. A task whose property is an object representing the new transaction. @@ -427,7 +427,7 @@ The name of the database for the connection to use. - A token to cancel the asynchronous operation. + An optional token to cancel the asynchronous operation. The default value is . Asynchronously changes the current database for an open connection. A task representing the asynchronous operation. diff --git a/xml/System.Data.Common/DbTransaction.xml b/xml/System.Data.Common/DbTransaction.xml index d5abea6dc59..bd75bbb3a40 100644 --- a/xml/System.Data.Common/DbTransaction.xml +++ b/xml/System.Data.Common/DbTransaction.xml @@ -138,7 +138,7 @@ - A token to cancel the asynchronous operation. + An optional token to cancel the asynchronous operation. The default value is . Asynchronously commits the database transaction. A representing the asynchronous operation. @@ -499,7 +499,7 @@ - A token to cancel the asynchronous operation. + An optional token to cancel the asynchronous operation. The default value is . Asynchronously rolls back a transaction from a pending state. A task representing the asynchronous operation.