Skip to content

Commit 5d696e2

Browse files
authored
Add remarks about stored exceptions (#8751)
1 parent b7db3b7 commit 5d696e2

File tree

137 files changed

+1338
-669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1338
-669
lines changed

xml/Microsoft.Extensions.Caching.Distributed/DistributedCacheExtensions.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<param name="key">The key to get the stored data for.</param>
9090
<summary>Asynchronously gets a string from the specified cache with the specified key.</summary>
9191
<returns>A task that gets the string value from the stored cache key.</returns>
92-
<remarks>To be added.</remarks>
92+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.GetString(Microsoft.Extensions.Caching.Distributed.IDistributedCache,System.String)" />.</remarks>
9393
</Docs>
9494
</Member>
9595
<Member MemberName="GetStringAsync">
@@ -131,7 +131,7 @@
131131
<param name="token">Optional. A <see cref="T:System.Threading.CancellationToken" /> to cancel the operation.</param>
132132
<summary>Asynchronously gets a string from the specified cache with the specified key.</summary>
133133
<returns>A task that gets the string value from the stored cache key.</returns>
134-
<remarks>To be added.</remarks>
134+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.GetString(Microsoft.Extensions.Caching.Distributed.IDistributedCache,System.String)" />.</remarks>
135135
</Docs>
136136
</Member>
137137
<Member MemberName="Set">
@@ -200,7 +200,7 @@
200200
<param name="value">The data to store in the cache.</param>
201201
<summary>Asynchronously sets a sequence of bytes in the specified cache with the specified key.</summary>
202202
<returns>A task that represents the asynchronous set operation.</returns>
203-
<remarks>To be added.</remarks>
203+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.Set(Microsoft.Extensions.Caching.Distributed.IDistributedCache,System.String,System.Byte[])" />.</remarks>
204204
<exception cref="T:System.ArgumentNullException">
205205
<paramref name="key" /> or <paramref name="value" /> is null.</exception>
206206
</Docs>
@@ -239,7 +239,7 @@
239239
<param name="token">Optional. A <see cref="T:System.Threading.CancellationToken" /> to cancel the operation.</param>
240240
<summary>Asynchronously sets a sequence of bytes in the specified cache with the specified key.</summary>
241241
<returns>A task that represents the asynchronous set operation.</returns>
242-
<remarks>To be added.</remarks>
242+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.Set(Microsoft.Extensions.Caching.Distributed.IDistributedCache,System.String,System.Byte[])" />.</remarks>
243243
<exception cref="T:System.ArgumentNullException">
244244
<paramref name="key" /> or <paramref name="value" /> is null.</exception>
245245
</Docs>
@@ -351,7 +351,7 @@
351351
<param name="value">The data to store in the cache.</param>
352352
<summary>Asynchronously sets a string in the specified cache with the specified key.</summary>
353353
<returns>A task that represents the asynchronous set operation.</returns>
354-
<remarks>To be added.</remarks>
354+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.SetString(Microsoft.Extensions.Caching.Distributed.IDistributedCache,System.String,System.String)" />.</remarks>
355355
<exception cref="T:System.ArgumentNullException">
356356
<paramref name="key" /> or <paramref name="value" /> is null.</exception>
357357
</Docs>
@@ -385,7 +385,7 @@
385385
<param name="options">The cache options for the entry.</param>
386386
<summary>Asynchronously sets a string in the specified cache with the specified key.</summary>
387387
<returns>A task that represents the asynchronous set operation.</returns>
388-
<remarks>To be added.</remarks>
388+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.SetString(Microsoft.Extensions.Caching.Distributed.IDistributedCache,System.String,System.String,Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions)" />.</remarks>
389389
<exception cref="T:System.ArgumentNullException">
390390
<paramref name="key" /> or <paramref name="value" /> is null.</exception>
391391
</Docs>
@@ -424,7 +424,7 @@
424424
<param name="token">Optional. A <see cref="T:System.Threading.CancellationToken" /> to cancel the operation.</param>
425425
<summary>Asynchronously sets a string in the specified cache with the specified key.</summary>
426426
<returns>A task that represents the asynchronous set operation.</returns>
427-
<remarks>To be added.</remarks>
427+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.SetString(Microsoft.Extensions.Caching.Distributed.IDistributedCache,System.String,System.String)" />.</remarks>
428428
<exception cref="T:System.ArgumentNullException">
429429
<paramref name="key" /> or <paramref name="value" /> is null.</exception>
430430
</Docs>
@@ -465,7 +465,7 @@
465465
<param name="token">Optional. A <see cref="T:System.Threading.CancellationToken" /> to cancel the operation.</param>
466466
<summary>Asynchronously sets a string in the specified cache with the specified key.</summary>
467467
<returns>A task that represents the asynchronous set operation.</returns>
468-
<remarks>To be added.</remarks>
468+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.SetString(Microsoft.Extensions.Caching.Distributed.IDistributedCache,System.String,System.String,Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions)" />.</remarks>
469469
<exception cref="T:System.ArgumentNullException">
470470
<paramref name="key" /> or <paramref name="value" /> is null.</exception>
471471
</Docs>

xml/Microsoft.Extensions.Caching.Distributed/IDistributedCache.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<param name="key">To be added.</param>
8383
<summary>To be added.</summary>
8484
<returns>To be added.</returns>
85-
<remarks>To be added.</remarks>
85+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.IDistributedCache.Get(System.String)" />.</remarks>
8686
</Docs>
8787
</Member>
8888
<Member MemberName="GetAsync">
@@ -116,7 +116,7 @@
116116
<param name="token">Optional. The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.</param>
117117
<summary>Gets a value with the given key.</summary>
118118
<returns>The <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation, containing the located value or null.</returns>
119-
<remarks>To be added.</remarks>
119+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.IDistributedCache.Get(System.String)" />.</remarks>
120120
</Docs>
121121
</Member>
122122
<Member MemberName="Refresh">
@@ -175,7 +175,7 @@
175175
<param name="key">To be added.</param>
176176
<summary>To be added.</summary>
177177
<returns>To be added.</returns>
178-
<remarks>To be added.</remarks>
178+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.IDistributedCache.Refresh(System.String)" />.</remarks>
179179
</Docs>
180180
</Member>
181181
<Member MemberName="RefreshAsync">
@@ -208,7 +208,7 @@
208208
<param name="token">Optional. The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.</param>
209209
<summary>Refreshes a value in the cache based on its key, resetting its sliding expiration timeout (if any).</summary>
210210
<returns>The <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation.</returns>
211-
<remarks>To be added.</remarks>
211+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.IDistributedCache.Refresh(System.String)" />.</remarks>
212212
</Docs>
213213
</Member>
214214
<Member MemberName="Remove">
@@ -267,7 +267,7 @@
267267
<param name="key">To be added.</param>
268268
<summary>To be added.</summary>
269269
<returns>To be added.</returns>
270-
<remarks>To be added.</remarks>
270+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.IDistributedCache.Remove(System.String)" />.</remarks>
271271
</Docs>
272272
</Member>
273273
<Member MemberName="RemoveAsync">
@@ -300,7 +300,7 @@
300300
<param name="token">Optional. The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.</param>
301301
<summary>Removes the value with the given key.</summary>
302302
<returns>The <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation.</returns>
303-
<remarks>To be added.</remarks>
303+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.IDistributedCache.Remove(System.String)" />.</remarks>
304304
</Docs>
305305
</Member>
306306
<Member MemberName="Set">
@@ -367,7 +367,7 @@
367367
<param name="options">To be added.</param>
368368
<summary>To be added.</summary>
369369
<returns>To be added.</returns>
370-
<remarks>To be added.</remarks>
370+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.IDistributedCache.Set(System.String,System.Byte[],Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions)" />.</remarks>
371371
</Docs>
372372
</Member>
373373
<Member MemberName="SetAsync">
@@ -404,7 +404,7 @@
404404
<param name="token">Optional. The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.</param>
405405
<summary>Sets the value with the given key.</summary>
406406
<returns>The <see cref="T:System.Threading.Tasks.Task" /> that represents the asynchronous operation.</returns>
407-
<remarks>To be added.</remarks>
407+
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:Microsoft.Extensions.Caching.Distributed.IDistributedCache.Set(System.String,System.Byte[],Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions)" />.</remarks>
408408
</Docs>
409409
</Member>
410410
</Members>

0 commit comments

Comments
 (0)