Skip to content

Commit 0554738

Browse files
carlossanlopRon Petrusha
andcommitted
Port System.Collections.Immutable source comments to Docs (#2492)
* Port System.Collections.Immutable source comments to Docs * Update xml/System.Collections.Immutable/ImmutableArray`1+Enumerator.xml suggestion by rpetrusha Co-Authored-By: Ron Petrusha <[email protected]>
1 parent 2e9b792 commit 0554738

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

xml/System.Collections.Immutable/ImmutableArray.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,13 @@
406406

407407
Creates an immutable array with the specified objects from another immutable array.</summary>
408408
<returns>An immutable array that contains the specified objects from the source array.</returns>
409-
<remarks>To be added.</remarks>
409+
<remarks>
410+
<format type="text/markdown"><![CDATA[
411+
412+
This overload allows helper methods or custom builder classes to efficiently avoid paying a redundant tax for copying an array when the new array is a segment of an existing array.
413+
414+
]]></format>
415+
</remarks>
410416
</Docs>
411417
</Member>
412418
<Member MemberName="Create&lt;T&gt;">
@@ -486,7 +492,13 @@
486492

487493
Creates an immutable array with specified objects from another array.</summary>
488494
<returns>An immutable array that contains the specified objects from the source array.</returns>
489-
<remarks>To be added.</remarks>
495+
<remarks>
496+
<format type="text/markdown"><![CDATA[
497+
498+
This overload allows helper methods or custom builder classes to efficiently avoid paying a redundant tax for copying an array when the new array is a segment of an existing array.
499+
500+
]]></format>
501+
</remarks>
490502
</Docs>
491503
</Member>
492504
<Member MemberName="Create&lt;T&gt;">

xml/System.Collections.Immutable/ImmutableArray`1+Enumerator.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@
2525
<summary>An array enumerator.
2626

2727
**NuGet package**: <see href="https://www.nuget.org/packages/System.Collections.Immutable/">System.Collections.Immutable</see> (<see href="https://docs.microsoft.com/dotnet/api/system.collections.immutable?#remarks">about immutable collections and how to install</see>)</summary>
28-
<remarks>To be added.</remarks>
28+
<remarks>
29+
<format type="text/markdown"><![CDATA[
30+
31+
> [!IMPORTANT]
32+
> This enumerator should **not** implement <xref:System.IDisposable>. The iterator should inline in a `foreach` loop and not result in a `try/finally` frame in the client.
33+
34+
]]></format>
35+
</remarks>
2936
</Docs>
3037
<Members>
3138
<Member MemberName="Current">
@@ -83,4 +90,4 @@
8390
</Docs>
8491
</Member>
8592
</Members>
86-
</Type>
93+
</Type>

0 commit comments

Comments
 (0)