@@ -49,10 +49,6 @@ public ConditionalWeakTable()
49
49
/// </param>
50
50
/// <returns>Returns "true" if key was found, "false" otherwise.</returns>
51
51
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
52
- /// <remarks>
53
- /// The key may get garbage collected during the TryGetValue operation. If so, TryGetValue
54
- /// may at its discretion, return "false" and set "value" to the default (as if the key was not present.)
55
- /// </remarks>
56
52
public bool TryGetValue ( TKey key , [ MaybeNullWhen ( false ) ] out TValue value )
57
53
{
58
54
if ( key is null )
@@ -67,11 +63,7 @@ public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
67
63
/// <param name="key">key to add. May not be null.</param>
68
64
/// <param name="value">value to associate with key.</param>
69
65
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
70
- /// <remarks>
71
- /// If the key is already entered into the dictionary, this method throws an exception.
72
- /// The key may get garbage collected during the Add() operation. If so, Add()
73
- /// has the right to consider any prior entries successfully removed and add a new entry without
74
- /// throwing an exception.
66
+ /// <exception cref="ArgumentException"><paramref name="key"/> is already entered into the dictionary.</exception>
75
67
/// </remarks>
76
68
public void Add ( TKey key , TValue value )
77
69
{
@@ -148,11 +140,6 @@ public void AddOrUpdate(TKey key, TValue value)
148
140
/// <param name="key">The key to remove.</param>
149
141
/// <returns><see langword="true"/> if the key is found and removed; otherwise, <see langword="false"/>.</returns>
150
142
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
151
- /// <remarks>
152
- /// The key may get garbage collected during the <see cref="Remove(TKey)"/> operation. If so,
153
- /// <see cref="Remove(TKey)"/> will not fail or throw, however, the return value can be either
154
- /// true or false depending on who wins the race.
155
- /// </remarks>
156
143
public bool Remove ( TKey key )
157
144
{
158
145
if ( key is null )
@@ -171,11 +158,6 @@ public bool Remove(TKey key)
171
158
/// <param name="value">value removed from the table, if it was present.</param>
172
159
/// <returns><see langword="true"/> if the key is found and removed; otherwise, <see langword="false"/>.</returns>
173
160
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
174
- /// <remarks>
175
- /// The key may get garbage collected during the <see cref="Remove(TKey, out TValue)"/> operation. If so,
176
- /// <see cref="Remove(TKey, out TValue)"/> will not fail or throw, however, the return value can be either
177
- /// true or false depending on who wins the race.
178
- /// </remarks>
179
161
public bool Remove ( TKey key , [ MaybeNullWhen ( false ) ] out TValue value )
180
162
{
181
163
if ( key is null )
0 commit comments