Skip to content

Commit 7d3b728

Browse files
directhexgewarren
andauthored
Port System.Collections new docs (#10165)
* System.Collections * Fix missed changes * Update xml/System.Collections.Generic/Dictionary`2+AlternateLookup`1.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Collections.Generic/Dictionary`2+AlternateLookup`1.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Collections.Generic/Dictionary`2+AlternateLookup`1.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Collections.Generic/HashSet`1+AlternateLookup`1.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Collections.Generic/HashSet`1+AlternateLookup`1.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Collections.Generic/HashSet`1+AlternateLookup`1.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Collections.Generic/HashSet`1.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Collections.ObjectModel/ReadOnlySet`1.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Collections.ObjectModel/ReadOnlySet`1.xml Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Genevieve Warren <[email protected]>
1 parent cfb5572 commit 7d3b728

13 files changed

+492
-424
lines changed

xml/System.Collections.Generic/Dictionary`2+AlternateLookup`1.xml

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
</Attribute>
3333
</Attributes>
3434
<Docs>
35-
<typeparam name="TAlternateKey">To be added.</typeparam>
36-
<summary>To be added.</summary>
35+
<typeparam name="TAlternateKey">The alternate type of a key for performing lookups.</typeparam>
36+
<summary>Provides a type that can be used to perform operations on a <see cref="T:System.Collections.Generic.Dictionary`2" /> using a <typeparamref name="TAlternateKey" /> as a key instead of a <typeparamref name="TKey" />.</summary>
3737
<remarks>To be added.</remarks>
3838
</Docs>
3939
<Members>
@@ -56,10 +56,13 @@
5656
<Parameter Name="key" Type="TAlternateKey" />
5757
</Parameters>
5858
<Docs>
59-
<param name="key">To be added.</param>
60-
<summary>To be added.</summary>
61-
<returns>To be added.</returns>
59+
<param name="key">The alternate key to check.</param>
60+
<summary>Determines whether the <see cref="T:System.Collections.Generic.Dictionary`2" /> contains the specified alternate key.</summary>
61+
<returns>
62+
<see langword="true" /> if the key is in the dictionary; otherwise, <see langword="false" />.</returns>
6263
<remarks>To be added.</remarks>
64+
<exception cref="T:System.ArgumentNullException">
65+
<paramref name="key" /> is <see langword="null" />.</exception>
6366
</Docs>
6467
</Member>
6568
<Member MemberName="Dictionary">
@@ -78,7 +81,7 @@
7881
<ReturnType>System.Collections.Generic.Dictionary&lt;TKey,TValue&gt;</ReturnType>
7982
</ReturnValue>
8083
<Docs>
81-
<summary>To be added.</summary>
84+
<summary>Gets the <see cref="T:System.Collections.Generic.Dictionary`2" /> against which this instance performs operations.</summary>
8285
<value>To be added.</value>
8386
<remarks>To be added.</remarks>
8487
</Docs>
@@ -102,10 +105,13 @@
102105
<Parameter Name="key" Type="TAlternateKey" />
103106
</Parameters>
104107
<Docs>
105-
<param name="key">To be added.</param>
106-
<summary>To be added.</summary>
107-
<value>To be added.</value>
108+
<param name="key">The alternate key of the value to get or set.</param>
109+
<summary>Gets or sets the value associated with the specified alternate key.</summary>
110+
<value>The value associated with the specified alternate key. If the specified alternate key is not found, a get operation throws a <see cref="T:System.Collections.Generic.KeyNotFoundException" />, and a set operation creates a new element with the specified key.</value>
108111
<remarks>To be added.</remarks>
112+
<exception cref="T:System.ArgumentNullException">
113+
<paramref name="key" /> is <see langword="null" />.</exception>
114+
<exception cref="T:System.Collections.Generic.KeyNotFoundException">The property is retrieved and alternate key does not exist in the collection.</exception>
109115
</Docs>
110116
</Member>
111117
<Member MemberName="Remove">
@@ -127,10 +133,13 @@
127133
<Parameter Name="key" Type="TAlternateKey" />
128134
</Parameters>
129135
<Docs>
130-
<param name="key">To be added.</param>
131-
<summary>To be added.</summary>
132-
<returns>To be added.</returns>
136+
<param name="key">The alternate key of the element to remove.</param>
137+
<summary>Removes the value with the specified alternate key from the <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
138+
<returns>
139+
<see langword="true" /> if the element is successfully found and removed; otherwise, <see langword="false" />.</returns>
133140
<remarks>To be added.</remarks>
141+
<exception cref="T:System.ArgumentNullException">
142+
<paramref name="key" /> is <see langword="null" />.</exception>
134143
</Docs>
135144
</Member>
136145
<Member MemberName="Remove">
@@ -154,12 +163,15 @@
154163
<Parameter Name="value" Type="TValue" RefType="out" />
155164
</Parameters>
156165
<Docs>
157-
<param name="key">To be added.</param>
158-
<param name="actualKey">To be added.</param>
159-
<param name="value">To be added.</param>
160-
<summary>To be added.</summary>
161-
<returns>To be added.</returns>
166+
<param name="key">The alternate key of the element to remove.</param>
167+
<param name="actualKey">When this method returns, contains the removed key.</param>
168+
<param name="value">When this method returns, contains the removed element.</param>
169+
<summary>Removes the value with the specified alternate key from the <see cref="T:System.Collections.Generic.Dictionary`2" />, and copies the element to the value parameter.</summary>
170+
<returns>
171+
<see langword="true" /> if the element is successfully found and removed; otherwise, <see langword="false" />.</returns>
162172
<remarks>To be added.</remarks>
173+
<exception cref="T:System.ArgumentNullException">
174+
<paramref name="key" /> is <see langword="null" />.</exception>
163175
</Docs>
164176
</Member>
165177
<Member MemberName="TryAdd">
@@ -182,11 +194,14 @@
182194
<Parameter Name="value" Type="TValue" />
183195
</Parameters>
184196
<Docs>
185-
<param name="key">To be added.</param>
186-
<param name="value">To be added.</param>
187-
<summary>To be added.</summary>
188-
<returns>To be added.</returns>
197+
<param name="key">The alternate key of the element to add.</param>
198+
<param name="value">The value of the element to add.</param>
199+
<summary>Attempts to add the specified key and value to the dictionary.</summary>
200+
<returns>
201+
<see langword="true" /> if the key/value pair was added to the dictionary successfully; otherwise, <see langword="false" />.</returns>
189202
<remarks>To be added.</remarks>
203+
<exception cref="T:System.ArgumentNullException">
204+
<paramref name="key" /> is <see langword="null" />.</exception>
190205
</Docs>
191206
</Member>
192207
<Member MemberName="TryGetValue">
@@ -209,11 +224,13 @@
209224
<Parameter Name="value" Type="TValue" RefType="out" />
210225
</Parameters>
211226
<Docs>
212-
<param name="key">To be added.</param>
213-
<param name="value">To be added.</param>
214-
<summary>To be added.</summary>
227+
<param name="key">The alternate key of the value to get.</param>
228+
<param name="value">When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter.</param>
229+
<summary>Gets the value associated with the specified alternate key.</summary>
215230
<returns>To be added.</returns>
216231
<remarks>To be added.</remarks>
232+
<exception cref="T:System.ArgumentNullException">
233+
<paramref name="key" /> is <see langword="null" />.</exception>
217234
</Docs>
218235
</Member>
219236
<Member MemberName="TryGetValue">
@@ -237,12 +254,14 @@
237254
<Parameter Name="value" Type="TValue" RefType="out" />
238255
</Parameters>
239256
<Docs>
240-
<param name="key">To be added.</param>
241-
<param name="actualKey">To be added.</param>
242-
<param name="value">To be added.</param>
243-
<summary>To be added.</summary>
257+
<param name="key">The alternate key of the value to get.</param>
258+
<param name="actualKey">When this method returns, contains the actual key associated with the alternate key, if the key is found; otherwise, the default value for the type of the key parameter.</param>
259+
<param name="value">When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter.</param>
260+
<summary>Gets the value associated with the specified alternate key.</summary>
244261
<returns>To be added.</returns>
245262
<remarks>To be added.</remarks>
263+
<exception cref="T:System.ArgumentNullException">
264+
<paramref name="key" /> is <see langword="null" />.</exception>
246265
</Docs>
247266
</Member>
248267
</Members>

xml/System.Collections.Generic/Dictionary`2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@
925925
<ReturnType>System.Int32</ReturnType>
926926
</ReturnValue>
927927
<Docs>
928-
<summary>To be added.</summary>
928+
<summary>Gets the total numbers of elements the internal data structure can hold without resizing.</summary>
929929
<value>To be added.</value>
930930
<remarks>To be added.</remarks>
931931
</Docs>

xml/System.Collections.Generic/HashSet`1+AlternateLookup`1.xml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
</Attribute>
3232
</Attributes>
3333
<Docs>
34-
<typeparam name="TAlternate">To be added.</typeparam>
35-
<summary>To be added.</summary>
34+
<typeparam name="TAlternate">The alternate type of instance for performing lookups.</typeparam>
35+
<summary>Provides a type that can be used to perform operations on a <see cref="T:System.Collections.Generic.HashSet`1" /> using a <typeparamref name="TAlternate" /> instead of a <typeparamref name="T" />.</summary>
3636
<remarks>To be added.</remarks>
3737
</Docs>
3838
<Members>
@@ -55,9 +55,10 @@
5555
<Parameter Name="item" Type="TAlternate" />
5656
</Parameters>
5757
<Docs>
58-
<param name="item">To be added.</param>
59-
<summary>To be added.</summary>
60-
<returns>To be added.</returns>
58+
<param name="item">The element to add to the set.</param>
59+
<summary>Adds the specified element to a set.</summary>
60+
<returns>
61+
<see langword="true" /> if the element is added to the set; <see langword="false" /> if the element is already present.</returns>
6162
<remarks>To be added.</remarks>
6263
</Docs>
6364
</Member>
@@ -80,9 +81,10 @@
8081
<Parameter Name="item" Type="TAlternate" />
8182
</Parameters>
8283
<Docs>
83-
<param name="item">To be added.</param>
84-
<summary>To be added.</summary>
85-
<returns>To be added.</returns>
84+
<param name="item">The element to locate in the set.</param>
85+
<summary>Determines whether a set contains the specified element.</summary>
86+
<returns>
87+
<see langword="true" /> if the set contains the specified element; otherwise, <see langword="false" />.</returns>
8688
<remarks>To be added.</remarks>
8789
</Docs>
8890
</Member>
@@ -105,9 +107,10 @@
105107
<Parameter Name="item" Type="TAlternate" />
106108
</Parameters>
107109
<Docs>
108-
<param name="item">To be added.</param>
109-
<summary>To be added.</summary>
110-
<returns>To be added.</returns>
110+
<param name="item">The element to remove.</param>
111+
<summary>Removes the specified element from a set.</summary>
112+
<returns>
113+
<see langword="true" /> if the element is successfully found and removed; otherwise, <see langword="false" />.</returns>
111114
<remarks>To be added.</remarks>
112115
</Docs>
113116
</Member>
@@ -127,7 +130,7 @@
127130
<ReturnType>System.Collections.Generic.HashSet&lt;T&gt;</ReturnType>
128131
</ReturnValue>
129132
<Docs>
130-
<summary>To be added.</summary>
133+
<summary>Gets the <see cref="T:System.Collections.Generic.HashSet`1" /> against which this instance performs operations.</summary>
131134
<value>To be added.</value>
132135
<remarks>To be added.</remarks>
133136
</Docs>
@@ -152,10 +155,10 @@
152155
<Parameter Name="actualValue" Type="T" RefType="out" />
153156
</Parameters>
154157
<Docs>
155-
<param name="equalValue">To be added.</param>
156-
<param name="actualValue">To be added.</param>
157-
<summary>To be added.</summary>
158-
<returns>To be added.</returns>
158+
<param name="equalValue">The value to search for.</param>
159+
<param name="actualValue">When this method returns, contains the value from the set that the search found, or the default value of <typeparamref name="T" /> if the search yielded no match.</param>
160+
<summary>Searches the set for a given value and returns the equal value it finds, if any.</summary>
161+
<returns><see langword="true" /> if the search was successful; otherwise, <see langword="false" />.</returns>
159162
<remarks>To be added.</remarks>
160163
</Docs>
161164
</Member>

xml/System.Collections.Generic/HashSet`1.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ The following example demonstrates how to merge two disparate sets. This example
658658
<ReturnType>System.Int32</ReturnType>
659659
</ReturnValue>
660660
<Docs>
661-
<summary>To be added.</summary>
661+
<summary>Gets the total numbers of elements the internal data structure can hold without resizing.</summary>
662662
<value>To be added.</value>
663663
<remarks>To be added.</remarks>
664664
</Docs>
@@ -2532,9 +2532,10 @@ The following example demonstrates how to merge two disparate sets. This example
25322532
<Parameter Name="capacity" Type="System.Int32" Index="0" FrameworkAlternate="net-9.0" />
25332533
</Parameters>
25342534
<Docs>
2535-
<param name="capacity">To be added.</param>
2536-
<summary>To be added.</summary>
2535+
<param name="capacity">The new capacity.</param>
2536+
<summary>Sets the capacity of a <see cref="T:System.Collections.Generic.HashSet`1" /> object to the specified number of entries, rounded up to a nearby, implementation-specific value.</summary>
25372537
<remarks>To be added.</remarks>
2538+
<exception cref="T:System.ArgumentOutOfRangeException">The specified capacity is lower than the count of entries.</exception>
25382539
</Docs>
25392540
</Member>
25402541
<Member MemberName="TryGetValue">

xml/System.Collections.Generic/IAlternateEqualityComparer`2.xml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
</Attribute>
3939
</Attributes>
4040
<Docs>
41-
<typeparam name="TAlternate">To be added.</typeparam>
42-
<typeparam name="T">To be added.</typeparam>
43-
<summary>To be added.</summary>
41+
<typeparam name="TAlternate">The alternate type to compare.</typeparam>
42+
<typeparam name="T">The type to compare.</typeparam>
43+
<summary>Implemented by an <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> to support comparing a <typeparamref name="TAlternate" /> instance with a <typeparamref name="T" /> instance.</summary>
4444
<remarks>To be added.</remarks>
4545
</Docs>
4646
<Members>
@@ -62,9 +62,9 @@
6262
<Parameter Name="alternate" Type="TAlternate" />
6363
</Parameters>
6464
<Docs>
65-
<param name="alternate">To be added.</param>
66-
<summary>To be added.</summary>
67-
<returns>To be added.</returns>
65+
<param name="alternate">The instance of type <typeparamref name="TAlternate" /> for which an equal <typeparamref name="T" /> is required.</param>
66+
<summary>Creates a <typeparamref name="T" /> that is considered by <see cref="M:System.Collections.Generic.IAlternateEqualityComparer`2.Equals(`0,`1)" /> to be equal to the specified <paramref name="alternate" />.</summary>
67+
<returns>A <typeparamref name="T" /> considered equal to the specified <paramref name="alternate" />.</returns>
6868
<remarks>To be added.</remarks>
6969
</Docs>
7070
</Member>
@@ -87,10 +87,11 @@
8787
<Parameter Name="other" Type="T" />
8888
</Parameters>
8989
<Docs>
90-
<param name="alternate">To be added.</param>
91-
<param name="other">To be added.</param>
92-
<summary>To be added.</summary>
93-
<returns>To be added.</returns>
90+
<param name="alternate">The instance of type <typeparamref name="TAlternate" /> to compare.</param>
91+
<param name="other">The instance of type <typeparamref name="T" /> to compare.</param>
92+
<summary>Determines whether the specified <paramref name="alternate" /> equals the specified <paramref name="other" />.</summary>
93+
<returns>
94+
<see langword="true" /> if the specified instances are equal; otherwise, <see langword="false" />.</returns>
9495
<remarks>To be added.</remarks>
9596
</Docs>
9697
</Member>
@@ -112,10 +113,11 @@
112113
<Parameter Name="alternate" Type="TAlternate" />
113114
</Parameters>
114115
<Docs>
115-
<param name="alternate">To be added.</param>
116-
<summary>To be added.</summary>
117-
<returns>To be added.</returns>
118-
<remarks>To be added.</remarks>
116+
<param name="alternate">The instance of type <typeparamref name="TAlternate" /> for which to get a hash code.</param>
117+
<summary>Returns a hash code for the specified alternate instance.</summary>
118+
<returns>A hash code for the specified instance.</returns>
119+
<remarks>This interface is intended to be implemented on a type that also implements <see cref="T:System.Collections.Generic.IEqualityComparer`1" />.
120+
The result of this method should return the same hash code as would invoking the <see cref="M:System.Collections.Generic.IEqualityComparer`1.GetHashCode(`0)" /> method on any <typeparamref name="T" /> for which <see cref="M:System.Collections.Generic.IAlternateEqualityComparer`2.Equals(`0,`1)" /> returns <see langword="true" />.</remarks>
119121
</Docs>
120122
</Member>
121123
</Members>

0 commit comments

Comments
 (0)