Skip to content

Commit

Permalink
Update cross reference errors in configurable retry logic documents (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DavoudEshtehari authored Jun 3, 2021
1 parent d3f9130 commit 688b931
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 27 deletions.
15 changes: 8 additions & 7 deletions doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2818,12 +2818,12 @@ The built-in column master key store providers that are available for the Window
You must set the value for this property before the command is executed for it to take effect.
To apply the retry logic, do the following steps before executing the command:
1. Define the configuration parameters by using <xref:Microsoft.Data.SqlClient.FixedRetryLogicOption> or <xref:Microsoft.Data.SqlClient.FloatingRetryLogicOption>.
1. Define the configuration parameters by using <xref:Microsoft.Data.SqlClient.SqlRetryLogicOption> type.
2. Create a <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider> by using one of the following static methods of the <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory> class:
- <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.CreateFixedRetryProvider>
- <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.CreateIncrementalRetryProvider>
- <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.CreateExponentialRetryProvider>
- <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.CreateNoneRetryProvider>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateFixedRetryProvider%2A>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateIncrementalRetryProvider%2A>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateExponentialRetryProvider%2A>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateNoneRetryProvider%2A>
3. Assign the <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider> object to the `RetryLogicProvider` property.
> [!NOTE]
Expand Down Expand Up @@ -2851,8 +2851,9 @@ The blocking connection simulates a situation like a command still running in th
### How to use with legacy asynchronous commands
Besides assigning the provider to the command and executing the command, it's possible to run it directly using the following <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider> methods:
- <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.Execute>
- <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.ExecuteAsync>
- <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.Execute%60%601(System.Object,System.Func{%60%600})>
- <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.ExecuteAsync(System.Object,System.Func{System.Threading.Tasks.Task},System.Threading.CancellationToken)>
- <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.ExecuteAsync%60%601(System.Object,System.Func{System.Threading.Tasks.Task{%60%600}},System.Threading.CancellationToken)>
[!code-csharp[SqlConfigurableRetryLogic_SqlCommand#4](~/../sqlclient/doc/samples/SqlConfigurableRetryLogic_SqlCommand.cs#4)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The following table shows the inner transient error list.
</remarks>
</SqlConfigurableRetryFactory>
<CreateExponentialRetryProvider>
<param name="retryLogicOption">An object of <see cref="T:Microsoft.Data.SqlClient.FloatingRetryLogicOption" /> containing the configuration for the object.</param>
<param name="retryLogicOption">An object of <see cref="T:Microsoft.Data.SqlClient.SqlRetryLogicOption" /> containing the configuration for the object.</param>
<summary>Provides an exponential time interval retry logic provider.</summary>
<returns>A <see cref="T:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider" /> object.</returns>
<remarks>
Expand All @@ -58,7 +58,7 @@ The following table shows the inner transient error list.
</exception>
</CreateExponentialRetryProvider>
<CreateIncrementalRetryProvider>
<param name="retryLogicOption">An object of <see cref="T:Microsoft.Data.SqlClient.FloatingRetryLogicOption" /> containing the configuration for the object.</param>
<param name="retryLogicOption">An object of <see cref="T:Microsoft.Data.SqlClient.SqlRetryLogicOption" /> containing the configuration for the object.</param>
<summary>Provides an incremental time interval retry logic provider.</summary>
<returns>A <see cref="T:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider" /> object.</returns>
<remarks>
Expand All @@ -79,7 +79,7 @@ The following table shows the inner transient error list.
</exception>
</CreateIncrementalRetryProvider>
<CreateFixedRetryProvider>
<param name="retryLogicOption">An object of <see cref="T:Microsoft.Data.SqlClient.FixedRetryLogicOption" /> containing the configuration for the object.</param>
<param name="retryLogicOption">An object of <see cref="T:Microsoft.Data.SqlClient.SqlRetryLogicOption" /> containing the configuration for the object.</param>
<summary>Provides a fixed interval time retry logic provider.</summary>
<returns>A <see cref="T:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider" /> object.</returns>
<remarks>
Expand Down
10 changes: 5 additions & 5 deletions doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1104,12 +1104,12 @@ The built-in column master key store providers that are available for the Window
You must set the value for this property before opening the connection to take effect.
To apply the retry logic, do the following steps before opening the connection:
1. Define the configuration parameters by using <xref:Microsoft.Data.SqlClient.FixedRetryLogicOption> or <xref:Microsoft.Data.SqlClient.FloatingRetryLogicOption>.
1. Define the configuration parameters by using <xref:Microsoft.Data.SqlClient.SqlRetryLogicOption> type.
2. Create a <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider> by using one of the following static methods of the <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory> class:
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateFixedRetryProvider>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateIncrementalRetryProvider>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateExponentialRetryProvider>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateNoneRetryProvider>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateFixedRetryProvider%2A>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateIncrementalRetryProvider%2A>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateExponentialRetryProvider%2A>
- <xref:Microsoft.Data.SqlClient.SqlConfigurableRetryFactory.CreateNoneRetryProvider%2A>
3. Assign the <xref:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider> object to the `RetryLogicProvider` property.
> [!NOTE]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<param name="maxTime">The maximum time allowed as a gap time.</param>
<param name="minTime">The minimum time allowed as a gap time.</param>
<summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlRetryIntervalBaseEnumerator" /> class.</summary>
<exception cref="T:System.ArgumentOutOfRangeException">The supplied arguments failed <see cref="T:Microsoft.Data.SqlClient.SqlRetryIntervalBaseEnumerator.Validate" /> validation.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">The supplied arguments failed <see cref="M:Microsoft.Data.SqlClient.SqlRetryIntervalBaseEnumerator.Validate(System.TimeSpan,System.TimeSpan,System.TimeSpan)" /> validation.</exception>
</ctor2>
<GapTimeInterval>
<summary>The default gap time of each interval.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<TransientPredicate>
<summary>Delegate to a transient condition predicate. The function that this delegate points to must return a true value when an expected transient exception happens.</summary>
<value>
<see cref="T:System.Predicate" /> value that delegates to a function that receives a <see cref="T:System.Exception" /> input parameter.</value>
<see cref="T:System.Predicate`1" /> value that delegates to a function that receives a <see cref="T:System.Exception" /> input parameter.</value>
</TransientPredicate>
<RetryCondition>
<param name="sender">The sender object.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
<typeparam name = "TResult">The object that the `function` returns when executed.</typeparam>
<param name="sender">The source of the event.</param>
<param name="function">The operation to re-execute if a transient condition occurs.</param>
<summary>Executes a function and applies retry logic, if enabled.

Exceptions will be reported via an aggregate exception if the execution isn't successful via retry attempts.
<summary>Executes a function and applies retry logic, if enabled. **Note:** Exceptions will be reported via an aggregate exception if the execution isn't successful via retry attempts.
</summary>
<returns>The return value of the `function` if it runs without exception.</returns>
<remarks>
Expand All @@ -56,9 +54,7 @@
<param name="sender">The source of the event.</param>
<param name="function">The operation to re-execute if a transient condition occurs.</param>
<param name="cancellationToken">The cancellation instruction.</param>
<summary>Executes a function and applies retry logic, if enabled. The cancellation token can be used to request that the operation be abandoned before the execution attempts are exceeded.

Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts.</summary>
<summary>Executes a function and applies retry logic, if enabled. The cancellation token can be used to request that the operation be abandoned before the execution attempts are exceeded. **Note:** Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts.</summary>
<returns>A task representing the asynchronous operation. The results of the task will be the return value of the `function`, if it runs without exception.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
Expand All @@ -76,9 +72,7 @@
<param name="sender">The source of the event.</param>
<param name="function">The operation to re-execute if a transient condition occurs.</param>
<param name="cancellationToken">The cancellation instruction.</param>
<summary>Executes a function and applies retry logic, if enabled. The cancellation token can be used to request that the operation be abandoned before the execution attempts are exceeded.

Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts.</summary>
<summary>Executes a function and applies retry logic, if enabled. The cancellation token can be used to request that the operation be abandoned before the execution attempts are exceeded. **Note:** Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts.</summary>
<returns>A Task or an exception.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The following sample declares a <xref:Microsoft.Data.SqlClient.SqlRetryLogicOpti
<AuthorizedSqlCondition>
<summary>Sets a pre-retry validation function on the <see cref="T:Microsoft.Data.SqlClient.SqlCommand.CommandText" /> to only include specific SQL statements.</summary>
<value>
<see cref="T:System.Predicate" /> The pre-retry validation delegate function; <see langword="true" /> if the `CommandText` is authorized to retry the operation.</value>
<see cref="T:System.Predicate`1" /> The pre-retry validation delegate function; <see langword="true" /> if the `CommandText` is authorized to retry the operation.</value>
</AuthorizedSqlCondition>
</members>
</docs>

0 comments on commit 688b931

Please sign in to comment.