Skip to content

Commit 19ca8d9

Browse files
carlossanlopRon Petrusha
authored andcommitted
coreclr: Automatic port of triple slash from System.Collections (#2719)
* coreclr: Automatic port of triple slash from System.Collections * suggestions by safern Co-Authored-By: Santiago Fernandez Madero <[email protected]> * Update Dictionary`2.xml * Update IAsyncEnumerator`1.xml
1 parent 8c61081 commit 19ca8d9

File tree

4 files changed

+43
-22
lines changed

4 files changed

+43
-22
lines changed

xml/System.Collections.Concurrent/ConcurrentQueue`1.xml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
</ReturnValue>
184184
<Parameters />
185185
<Docs>
186-
<summary>To be added.</summary>
186+
<summary>Removes all objects from the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />.</summary>
187187
<remarks>To be added.</remarks>
188188
</Docs>
189189
</Member>
@@ -778,9 +778,17 @@
778778
<summary>Tries to return an object from the beginning of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> without removing it.</summary>
779779
<returns>
780780
<see langword="true" /> if an object was returned successfully; otherwise, <see langword="false" />.</returns>
781-
<remarks>To be added.</remarks>
781+
<remarks>
782+
<format type="text/markdown"><![CDATA[
783+
784+
## Remarks
785+
786+
For determining whether the collection contains any items, use of the <xref:System.Collections.Concurrent.ConcurrentQueue`1.IsEmpty> property is recommended rather than peeking.
787+
788+
]]></format>
789+
</remarks>
782790
<related type="Article" href="https://msdn.microsoft.com/library/2e7ca21f-786c-4367-96be-0cf3f3dcc6bd">Thread-Safe Collections</related>
783791
</Docs>
784792
</Member>
785793
</Members>
786-
</Type>
794+
</Type>

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

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,10 +1010,11 @@
10101010
<Parameter Name="capacity" Type="System.Int32" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
10111011
</Parameters>
10121012
<Docs>
1013-
<param name="capacity">To be added.</param>
1014-
<summary>To be added.</summary>
1015-
<returns>To be added.</returns>
1013+
<param name="capacity">The number of entries.</param>
1014+
<summary>Ensures that the dictionary can hold up to a specified number of entries without any further expansion of its backing storage.</summary>
1015+
<returns>The current capacity of the <see cref="T:System.Collections.Generic.Dictionary`2" />.</returns>
10161016
<remarks>To be added.</remarks>
1017+
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="capacity" /> is less than 0.</exception>
10171018
</Docs>
10181019
</Member>
10191020
<Member MemberName="GetEnumerator">
@@ -2715,8 +2716,19 @@ finally {
27152716
</ReturnValue>
27162717
<Parameters />
27172718
<Docs>
2718-
<summary>To be added.</summary>
2719-
<remarks>To be added.</remarks>
2719+
<summary>Sets the capacity of this dictionary to what it would be if it had been originally initialized with all its entries.</summary>
2720+
<remarks>
2721+
<format type="text/markdown"><![CDATA[
2722+
2723+
This method can be used to minimize memory overhead once it is known that no new elements will be added to the dictionary. To allocate a minimum size storage array, execute the following statements:
2724+
2725+
```csharp
2726+
dictionary.Clear();
2727+
dictionary.TrimExcess();
2728+
```
2729+
2730+
]]></format>
2731+
</remarks>
27202732
</Docs>
27212733
</Member>
27222734
<Member MemberName="TrimExcess">
@@ -2745,9 +2757,10 @@ finally {
27452757
<Parameter Name="capacity" Type="System.Int32" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
27462758
</Parameters>
27472759
<Docs>
2748-
<param name="capacity">To be added.</param>
2749-
<summary>To be added.</summary>
2750-
<remarks>To be added.</remarks>
2760+
<param name="capacity">The new capacity.</param>
2761+
<summary>Sets the capacity of this dictionary to hold up a specified number of entries without any further expansion of its backing storage.</summary>
2762+
<remarks>This method can be used to minimize the memory overhead once it is known that no new elements will be added.</remarks>
2763+
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="capacity" /> is less than <see cref="T:System.Collections.Generic.Dictionary`2" />.</exception>
27512764
</Docs>
27522765
</Member>
27532766
<Member MemberName="TryAdd">
@@ -2936,4 +2949,4 @@ Unlike the <xref:System.Collections.Generic.Dictionary%602.Add%2A> method, this
29362949
</Docs>
29372950
</Member>
29382951
</Members>
2939-
</Type>
2952+
</Type>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<Interfaces />
2424
<Docs>
2525
<typeparam name="T">To be added.</typeparam>
26-
<summary>To be added.</summary>
26+
<summary>Exposes an enumerator that provides asynchronous iteration over values of a specified type.</summary>
2727
<remarks>To be added.</remarks>
2828
</Docs>
2929
<Members>
@@ -48,9 +48,9 @@
4848
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
4949
</Parameters>
5050
<Docs>
51-
<param name="cancellationToken">To be added.</param>
52-
<summary>To be added.</summary>
53-
<returns>To be added.</returns>
51+
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken" /> that may be used to cancel the asynchronous iteration.</param>
52+
<summary>Returns an enumerator that iterates asynchronously through the collection.</summary>
53+
<returns>An enumerator that can be used to iterate asynchronously through the collection.</returns>
5454
<remarks>To be added.</remarks>
5555
</Docs>
5656
</Member>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</Interfaces>
2828
<Docs>
2929
<typeparam name="T">To be added.</typeparam>
30-
<summary>To be added.</summary>
30+
<summary>Supports a simple asynchronous iteration over a generic collection.</summary>
3131
<remarks>To be added.</remarks>
3232
</Docs>
3333
<Members>
@@ -50,8 +50,8 @@
5050
<ReturnType>T</ReturnType>
5151
</ReturnValue>
5252
<Docs>
53-
<summary>To be added.</summary>
54-
<value>To be added.</value>
53+
<summary>Gets the element in the collection at the current position of the enumerator.</summary>
54+
<value>The element in the collection at the current position of the enumerator.</value>
5555
<remarks>To be added.</remarks>
5656
</Docs>
5757
</Member>
@@ -76,10 +76,10 @@
7676
</ReturnValue>
7777
<Parameters />
7878
<Docs>
79-
<summary>To be added.</summary>
80-
<returns>To be added.</returns>
79+
<summary>Advances the enumerator asynchronously to the next element of the collection.</summary>
80+
<returns>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> that will complete with a result of <see langword="true" /> if the enumerator was successfully advanced to the next element, or <see langword="false" /> if the enumerator has passed the end of the collection.</returns>
8181
<remarks>To be added.</remarks>
8282
</Docs>
8383
</Member>
8484
</Members>
85-
</Type>
85+
</Type>

0 commit comments

Comments
 (0)