|
1 |
| -<?xml version="1.0"?> |
2 |
| -<docs> |
3 |
| - <members name="SqlRetryLogicBaseProvider"> |
4 |
| - <SqlRetryLogicBaseProvider> |
5 |
| - <summary>Applies retry logic on an operation through the `Execute` or `ExecuteAsync` function.</summary> |
6 |
| - </SqlRetryLogicBaseProvider> |
7 |
| - <Retrying> |
8 |
| - <summary>Occurs before applying the calculated delay time and executing the function on a next attempt.</summary> |
9 |
| - <value> |
10 |
| - <see cref="System.EventHandler" /> with event argument of <see cref="T:Microsoft.Data.SqlClient.SqlRetryingEventArgs" /> object can be subscribed.</value> |
11 |
| - <remarks> |
12 |
| - <format type="text/markdown"><![CDATA[ |
13 |
| -
|
14 |
| -> [IMPORTANT!] |
15 |
| -> Don't block execution with a time consuming action when an event occurs. For instance, if you log data to a file, run it in a new thread to avoid blocking the main execution thread. |
16 |
| -
|
17 |
| -]]> |
18 |
| - </format> |
19 |
| - </remarks> |
20 |
| - </Retrying> |
21 |
| - <RetryLogic> |
22 |
| - <summary>Defines the retry logic used to decide when to retry based on the encountered exception.</summary> |
23 |
| - <remarks> |
24 |
| - <format type="text/markdown"><![CDATA[ |
25 |
| -
|
26 |
| -> [!NOTE] |
27 |
| -> The `RetryLogic` property is assigned at `SqlRetryLogicBaseProvider` creation and its value is used as a template internally. Don't use it to monitor the status of the retry logic during and after execution. Instead, use the <xref=E:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.Retrying> event to collect data about retry executions. |
28 |
| -
|
29 |
| -]]> |
30 |
| - </format> |
31 |
| - </remarks> |
32 |
| - </RetryLogic> |
33 |
| - <Execute> |
34 |
| - <typeparam name = "TResult">The object that the `function` returns when executed.</typeparam> |
35 |
| - <param name="sender">The source of the event.</param> |
36 |
| - <param name="function">The operation to re-execute if a transient condition occurs.</param> |
37 |
| - <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. |
38 |
| - </summary> |
39 |
| - <returns>The return value of the `function` if it runs without exception.</returns> |
40 |
| - <remarks> |
41 |
| - <format type="text/markdown"><![CDATA[ |
42 |
| -
|
43 |
| -> [!NOTE] |
44 |
| -> The type of exception depends on the `function`'s internal implementation. But if the exception is due to all retry attempts failing, it will be an <xref:System.AggregateException> that consists of all exceptions that happened during the failed attempts. |
45 |
| -
|
46 |
| -]]> |
47 |
| - </format> |
48 |
| - </remarks> |
49 |
| - <exception cref="T:System.ArgumentNullException">The `function` parameter can't be `null`.</exception> |
50 |
| - <exception cref="T:System.AggregateException">The collection of exceptions after all retry attempts have failed.</exception> |
51 |
| - </Execute> |
52 |
| - <ExecuteAsync1> |
53 |
| - <typeparam name = "TResult">The object that the `function` returns in a Task when executed.</typeparam> |
54 |
| - <param name="sender">The source of the event.</param> |
55 |
| - <param name="function">The operation to re-execute if a transient condition occurs.</param> |
56 |
| - <param name="cancellationToken">The cancellation instruction.</param> |
57 |
| - <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> |
58 |
| - <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> |
59 |
| - <remarks> |
60 |
| - <format type="text/markdown"><![CDATA[ |
61 |
| -
|
62 |
| -> [!NOTE] |
63 |
| -> If the exception comes from all retry attempts failing, it will be an <xref:System.AggregateException> that consists of all exceptions from the failed attempts. |
64 |
| -
|
65 |
| -]]> |
66 |
| - </format> |
67 |
| - </remarks> |
68 |
| - <exception cref="T:System.ArgumentNullException">The `function` parameter can't be `null`.</exception> |
69 |
| - <exception cref="T:System.AggregateException">The collection of exceptions after failed retry attempts.</exception> |
70 |
| - </ExecuteAsync1> |
71 |
| - <ExecuteAsync2> |
72 |
| - <param name="sender">The source of the event.</param> |
73 |
| - <param name="function">The operation to re-execute if a transient condition occurs.</param> |
74 |
| - <param name="cancellationToken">The cancellation instruction.</param> |
75 |
| - <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> |
76 |
| - <returns>A Task or an exception.</returns> |
77 |
| - <remarks> |
78 |
| - <format type="text/markdown"><![CDATA[ |
79 |
| -
|
80 |
| -> [!NOTE] |
81 |
| -> If the exception comes from all retry attempts failing, it will be an <xref:System.AggregateException> that consists of all exceptions from the failed attempts. |
82 |
| -
|
83 |
| -]]> |
84 |
| - </format> |
85 |
| - </remarks> |
86 |
| - <exception cref="T:System.ArgumentNullException">The `function` parameter can't be `null`.</exception> |
87 |
| - <exception cref="T:System.AggregateException">The collection of exceptions after failed retry attempts.</exception> |
88 |
| - </ExecuteAsync2> |
89 |
| - </members> |
| 1 | +<docs> |
| 2 | + <members name="SqlRetryLogicBaseProvider"> |
| 3 | + <SqlRetryLogicBaseProvider> |
| 4 | + <summary> |
| 5 | + Applies retry logic on an operation through the <see cref="M:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.Execute{TResult}(System.Object,System.Func{TResult})" /> or <see cref="M:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.Execute{TResult}(System.Object,System.Func{System.Threading.Task{TResult}},System.Threading.CancellationToken)" /> function. |
| 6 | + </summary> |
| 7 | + </SqlRetryLogicBaseProvider> |
| 8 | + <Retrying> |
| 9 | + <summary> |
| 10 | + Occurs before applying the calculated delay time and executing the function on a next attempt. |
| 11 | + </summary> |
| 12 | + <value> |
| 13 | + <see cref="T:System.EventHandler" /> with event argument of <see cref="T:Microsoft.Data.SqlClient.SqlRetryingEventArgs" /> object can be subscribed. |
| 14 | + </value> |
| 15 | + <remarks> |
| 16 | + <note type="important"> |
| 17 | + Don't block execution with a time-consuming action when an event occurs. For instance, if you log data to a file, run it in a new thread to avoid blocking the main execution thread. |
| 18 | + </note> |
| 19 | + </remarks> |
| 20 | + </Retrying> |
| 21 | + <RetryLogic> |
| 22 | + <summary> |
| 23 | + Defines the retry logic used to decide when to retry based on the encountered exception. |
| 24 | + </summary> |
| 25 | + <remarks> |
| 26 | + <note type="note"> |
| 27 | + The <b>RetryLogic</b> property is assigned at construction of the <see cref="T:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider" /> creation and its value is used as a template internally. Don't use it to monitor the status of the retry logic during and after execution. Instead, use the <see cref="P:Microsoft.Data.SqlClient.SqlRetryLogicBaseProvider.Retrying" /> event to collect data about retry executions. |
| 28 | + </note> |
| 29 | + </remarks> |
| 30 | + </RetryLogic> |
| 31 | + <Execute> |
| 32 | + <typeparam name="TResult"> |
| 33 | + The object that the `function` returns when executed. |
| 34 | + </typeparam> |
| 35 | + <param name="sender"> |
| 36 | + The source of the event. |
| 37 | + </param> |
| 38 | + <param name="function"> |
| 39 | + The operation to re-execute if a transient condition occurs. |
| 40 | + </param> |
| 41 | + <summary> |
| 42 | + <para> |
| 43 | + Executes a function and applies retry logic, if enabled. |
| 44 | + </para> |
| 45 | + <note type="note"> |
| 46 | + Exceptions will be reported via an aggregate exception if the execution isn't successful via retry attempts. |
| 47 | + </note> |
| 48 | + </summary> |
| 49 | + <returns> |
| 50 | + The return value of the <paramref name="function" /> if it runs without exception. |
| 51 | + </returns> |
| 52 | + <remarks> |
| 53 | + <para> |
| 54 | + <note type="note"> |
| 55 | + The type of exception depends on the <paramref name="function" />'s internal implementation. But if the exception is due to all retry attempts failing, it will be an <see cref="T:System.AggregateException" /> that consists of all exceptions that happened during the failed attempts. |
| 56 | + </note> |
| 57 | + </para> |
| 58 | + </remarks> |
| 59 | + <exception cref="T:System.ArgumentNullException"> |
| 60 | + The <paramref name="function" /> parameter can't be <see langword="null" />. |
| 61 | + </exception> |
| 62 | + <exception cref="T:System.AggregateException"> |
| 63 | + The collection of exceptions after all retry attempts have failed. |
| 64 | + </exception> |
| 65 | + </Execute> |
| 66 | + <ExecuteAsync1> |
| 67 | + <typeparam name="TResult"> |
| 68 | + The object that the <paramref name="function" /> returns in a Task when executed. |
| 69 | + </typeparam> |
| 70 | + <param name="sender"> |
| 71 | + The source of the event. |
| 72 | + </param> |
| 73 | + <param name="function"> |
| 74 | + The operation to re-execute if a transient condition occurs. |
| 75 | + </param> |
| 76 | + <param name="cancellationToken"> |
| 77 | + The cancellation instruction. |
| 78 | + </param> |
| 79 | + <summary> |
| 80 | + <para> |
| 81 | + 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. |
| 82 | + </para> |
| 83 | + <note type="note"> |
| 84 | + Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts. |
| 85 | + </note> |
| 86 | + </summary> |
| 87 | + <returns> |
| 88 | + A task representing the asynchronous operation. The results of the task will be the return value of the <paramref name="function" />, if it runs without exception. |
| 89 | + </returns> |
| 90 | + <remarks> |
| 91 | + <note type="note"> |
| 92 | + If the exception comes from all retry attempts failing, it will be an <see cref="T:System.AggregateException" /> that consists of all exceptions from the failed attempts. |
| 93 | + </note> |
| 94 | + </remarks> |
| 95 | + <exception cref="T:System.ArgumentNullException"> |
| 96 | + The <paramref name="function" /> parameter can't be <see langword="null" />. |
| 97 | + </exception> |
| 98 | + <exception cref="T:System.AggregateException"> |
| 99 | + The collection of exceptions after failed retry attempts. |
| 100 | + </exception> |
| 101 | + </ExecuteAsync1> |
| 102 | + <ExecuteAsync2> |
| 103 | + <param name="sender"> |
| 104 | + The source of the event. |
| 105 | + </param> |
| 106 | + <param name="function"> |
| 107 | + The operation to re-execute if a transient condition occurs. |
| 108 | + </param> |
| 109 | + <param name="cancellationToken"> |
| 110 | + The cancellation instruction. |
| 111 | + </param> |
| 112 | + <summary> |
| 113 | + <para> |
| 114 | + 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. |
| 115 | + </para> |
| 116 | + <note type="note"> |
| 117 | + Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts. |
| 118 | + </note> |
| 119 | + </summary> |
| 120 | + <returns> |
| 121 | + A Task or an exception. |
| 122 | + </returns> |
| 123 | + <remarks> |
| 124 | + <note type="note"> |
| 125 | + If the exception comes from all retry attempts failing, it will be an <see cref="T:System.AggregateException" /> that consists of all exceptions from the failed attempts. |
| 126 | + </note> |
| 127 | + </remarks> |
| 128 | + <exception cref="T:System.ArgumentNullException"> |
| 129 | + The <paramref name="function" /> parameter can't be <see langword="null" />. |
| 130 | + </exception> |
| 131 | + <exception cref="T:System.AggregateException"> |
| 132 | + The collection of exceptions after failed retry attempts. |
| 133 | + </exception> |
| 134 | + </ExecuteAsync2> |
| 135 | + </members> |
90 | 136 | </docs>
|
0 commit comments