Skip to content

Commit 7cad836

Browse files
committed
Remove unclear remarks
1 parent f9cddc6 commit 7cad836

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ public ConditionalWeakTable()
4949
/// </param>
5050
/// <returns>Returns "true" if key was found, "false" otherwise.</returns>
5151
/// <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>
5652
public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
5753
{
5854
if (key is null)
@@ -67,12 +63,7 @@ public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
6763
/// <param name="key">key to add. May not be null.</param>
6864
/// <param name="value">value to associate with key.</param>
6965
/// <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.
75-
/// </remarks>
66+
/// <exception cref="ArgumentException"><paramref name="key"/> is already entered into the dictionary.</exception>
7667
public void Add(TKey key, TValue value)
7768
{
7869
if (key is null)
@@ -148,11 +139,6 @@ public void AddOrUpdate(TKey key, TValue value)
148139
/// <param name="key">The key to remove.</param>
149140
/// <returns><see langword="true"/> if the key is found and removed; otherwise, <see langword="false"/>.</returns>
150141
/// <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>
156142
public bool Remove(TKey key)
157143
{
158144
if (key is null)
@@ -171,11 +157,6 @@ public bool Remove(TKey key)
171157
/// <param name="value">value removed from the table, if it was present.</param>
172158
/// <returns><see langword="true"/> if the key is found and removed; otherwise, <see langword="false"/>.</returns>
173159
/// <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>
179160
public bool Remove(TKey key, [MaybeNullWhen(false)] out TValue value)
180161
{
181162
if (key is null)

0 commit comments

Comments
 (0)