Skip to content

Commit a6f4681

Browse files
mairawRon Petrusha
authored andcommitted
exceptions + new content (#2622)
* exceptions + new content * feedback * feedback * Update ArraySegment`1.xml * Update ArraySegment`1.xml * fix tags
1 parent c526881 commit a6f4681

File tree

1 file changed

+37
-63
lines changed

1 file changed

+37
-63
lines changed

xml/System/ArraySegment`1.xml

Lines changed: 37 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -639,9 +639,10 @@
639639
</ReturnValue>
640640
<Parameters />
641641
<Docs>
642-
<summary>To be added.</summary>
643-
<returns>To be added.</returns>
642+
<summary>Returns an enumerator that can be used to iterate through the array segment.</summary>
643+
<returns>An enumerator that can be used to iterate through the array segment.</returns>
644644
<remarks>To be added.</remarks>
645+
<exception cref="T:System.InvalidOperationException">The underlying array is <see langword="null" />.</exception>
645646
</Docs>
646647
</Member>
647648
<Member MemberName="GetHashCode">
@@ -712,10 +713,12 @@
712713
<Parameter Name="index" Type="System.Int32" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
713714
</Parameters>
714715
<Docs>
715-
<param name="index">To be added.</param>
716-
<summary>To be added.</summary>
717-
<value>To be added.</value>
716+
<param name="index">The zero-based index of the element to get or set.</param>
717+
<summary>Gets or sets the element at the specified index.</summary>
718+
<value>The element at the specified index.</value>
718719
<remarks>To be added.</remarks>
720+
<exception cref="T:System.ArgumentOutOfRangeException">
721+
<paramref name="index" /> is not a valid index in the <see cref="T:System.ArraySegment`1" />.</exception>
719722
</Docs>
720723
</Member>
721724
<Member MemberName="Offset">
@@ -1020,16 +1023,10 @@
10201023
</Parameters>
10211024
<Docs>
10221025
<param name="item">The object to add to the array segment.</param>
1023-
<summary>Adds an item to the array segment.</summary>
1024-
<remarks>
1025-
<format type="text/markdown"><![CDATA[
1026-
1027-
## Remarks
1028-
This member is an explicit interface member implementation. It can be used only when the <xref:System.ArraySegment%601> instance is cast to an <xref:System.Collections.Generic.ICollection%601> interface.
1029-
1030-
]]></format>
1031-
</remarks>
1032-
<exception cref="T:System.NotSupportedException">The array segment is read-only.</exception>
1026+
<summary>Throws a <see cref="T:System.NotSupportedException" /> exception in all cases.</summary>
1027+
<returns>Always throws an exception.</returns>
1028+
<remarks>This method always throws a <see cref="T:System.NotSupportedException" /> because an array segment cannot be expanded.</remarks>
1029+
<exception cref="T:System.NotSupportedException">In all cases.</exception>
10331030
</Docs>
10341031
</Member>
10351032
<Member MemberName="System.Collections.Generic.ICollection&lt;T&gt;.Clear">
@@ -1066,16 +1063,10 @@
10661063
</ReturnValue>
10671064
<Parameters />
10681065
<Docs>
1069-
<summary>Removes all items from the array segment.</summary>
1070-
<remarks>
1071-
<format type="text/markdown"><![CDATA[
1072-
1073-
## Remarks
1074-
This member is an explicit interface member implementation. It can be used only when the <xref:System.ArraySegment%601> instance is cast to an <xref:System.Collections.Generic.ICollection%601> interface.
1075-
1076-
]]></format>
1077-
</remarks>
1078-
<exception cref="T:System.NotSupportedException">The array segment is read-only.</exception>
1066+
<summary>Throws a <see cref="T:System.NotSupportedException" /> exception in all cases.</summary>
1067+
<returns>Always throws an exception.</returns>
1068+
<remarks>This method always throws a <see cref="T:System.NotSupportedException" /> because an array segment cannot be contracted.</remarks>
1069+
<exception cref="T:System.NotSupportedException">In all cases.</exception>
10791070
</Docs>
10801071
</Member>
10811072
<Member MemberName="System.Collections.Generic.ICollection&lt;T&gt;.Contains">
@@ -1126,6 +1117,7 @@
11261117
11271118
]]></format>
11281119
</remarks>
1120+
<exception cref="T:System.InvalidOperationException">The underlying array is <see langword="null" />.</exception>
11291121
</Docs>
11301122
</Member>
11311123
<Member MemberName="System.Collections.Generic.ICollection&lt;T&gt;.CopyTo">
@@ -1188,6 +1180,7 @@
11881180
-or-
11891181

11901182
Type <paramref name="T" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
1183+
<exception cref="T:System.InvalidOperationException">The underlying array for this <see cref="T:System.ArraySegment`1" /> instance is <see langword="null" />.</exception>
11911184
</Docs>
11921185
</Member>
11931186
<Member MemberName="System.Collections.Generic.ICollection&lt;T&gt;.IsReadOnly">
@@ -1274,18 +1267,10 @@
12741267
</Parameters>
12751268
<Docs>
12761269
<param name="item">The object to remove from the array segment.</param>
1277-
<summary>Removes the first occurrence of a specific object from the array segment.</summary>
1278-
<returns>
1279-
<see langword="true" /> if <paramref name="item" /> was successfully removed from the array segment; otherwise, <see langword="false" />. This method also returns <see langword="false" /> if <paramref name="item" /> is not found in the array segment.</returns>
1280-
<remarks>
1281-
<format type="text/markdown"><![CDATA[
1282-
1283-
## Remarks
1284-
This member is an explicit interface member implementation. It can be used only when the <xref:System.ArraySegment%601> instance is cast to an <xref:System.Collections.Generic.ICollection%601> interface.
1285-
1286-
]]></format>
1287-
</remarks>
1288-
<exception cref="T:System.NotSupportedException">The array segment is read-only.</exception>
1270+
<summary>Throws a <see cref="T:System.NotSupportedException" /> exception in all cases.</summary>
1271+
<returns>Always throws an exception.</returns>
1272+
<remarks>This method always throws a <see cref="T:System.NotSupportedException" /> because an array segment cannot be contracted.</remarks>
1273+
<exception cref="T:System.NotSupportedException">In all cases.</exception>
12891274
</Docs>
12901275
</Member>
12911276
<Member MemberName="System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator">
@@ -1332,6 +1317,7 @@
13321317
13331318
]]></format>
13341319
</remarks>
1320+
<exception cref="T:System.InvalidOperationException">The underlying array is <see langword="null" />.</exception>
13351321
</Docs>
13361322
</Member>
13371323
<Member MemberName="System.Collections.Generic.IList&lt;T&gt;.IndexOf">
@@ -1381,6 +1367,7 @@
13811367
13821368
]]></format>
13831369
</remarks>
1370+
<exception cref="T:System.InvalidOperationException">The underlying array is <see langword="null" />.</exception>
13841371
</Docs>
13851372
</Member>
13861373
<Member MemberName="System.Collections.Generic.IList&lt;T&gt;.Insert">
@@ -1422,18 +1409,10 @@
14221409
<Docs>
14231410
<param name="index">The zero-based index at which <paramref name="item" /> should be inserted.</param>
14241411
<param name="item">The object to insert into the array segment.</param>
1425-
<summary>Inserts an item into the array segment at the specified index.</summary>
1426-
<remarks>
1427-
<format type="text/markdown"><![CDATA[
1428-
1429-
## Remarks
1430-
This member is an explicit interface member implementation. It can be used only when the <xref:System.ArraySegment%601> instance is cast to an <xref:System.Collections.Generic.IList%601> interface.
1431-
1432-
]]></format>
1433-
</remarks>
1434-
<exception cref="T:System.ArgumentOutOfRangeException">
1435-
<paramref name="index" /> is not a valid index in the array segment.</exception>
1436-
<exception cref="T:System.NotSupportedException">The array segment is read-only.</exception>
1412+
<summary>Throws a <see cref="T:System.NotSupportedException" /> exception in all cases.</summary>
1413+
<returns>Always throws an exception.</returns>
1414+
<remarks>This method always throws a <see cref="T:System.NotSupportedException" /> because an array segment cannot be expanded.</remarks>
1415+
<exception cref="T:System.NotSupportedException">In all cases.</exception>
14371416
</Docs>
14381417
</Member>
14391418
<Member MemberName="System.Collections.Generic.IList&lt;T&gt;.Item">
@@ -1529,18 +1508,10 @@
15291508
</Parameters>
15301509
<Docs>
15311510
<param name="index">The zero-based index of the item to remove.</param>
1532-
<summary>Removes the array segment item at the specified index.</summary>
1533-
<remarks>
1534-
<format type="text/markdown"><![CDATA[
1535-
1536-
## Remarks
1537-
This member is an explicit interface member implementation. It can be used only when the <xref:System.ArraySegment%601> instance is cast to an <xref:System.Collections.Generic.IList%601> interface.
1538-
1539-
]]></format>
1540-
</remarks>
1541-
<exception cref="T:System.ArgumentOutOfRangeException">
1542-
<paramref name="index" /> is not a valid index in the array segment.</exception>
1543-
<exception cref="T:System.NotSupportedException">The array segment is read-only.</exception>
1511+
<summary>Throws a <see cref="T:System.NotSupportedException" /> exception in all cases.</summary>
1512+
<returns>Always throws an exception.</returns>
1513+
<remarks>This method always throws a <see cref="T:System.NotSupportedException" /> because an array segment cannot be contracted.</remarks>
1514+
<exception cref="T:System.NotSupportedException">In all cases.</exception>
15441515
</Docs>
15451516
</Member>
15461517
<Member MemberName="System.Collections.Generic.IReadOnlyList&lt;T&gt;.Item">
@@ -1593,6 +1564,7 @@
15931564
</remarks>
15941565
<exception cref="T:System.ArgumentOutOfRangeException">
15951566
<paramref name="index" /> is not a valid index in the <see cref="T:System.ArraySegment`1" />.</exception>
1567+
<exception cref="T:System.InvalidOperationException">The underlying array is <see langword="null" />.</exception>
15961568
<exception cref="T:System.NotSupportedException">The property is set.</exception>
15971569
</Docs>
15981570
</Member>
@@ -1640,6 +1612,7 @@
16401612
16411613
]]></format>
16421614
</remarks>
1615+
<exception cref="T:System.InvalidOperationException">The underlying array is <see langword="null" />.</exception>
16431616
</Docs>
16441617
</Member>
16451618
<Member MemberName="ToArray">
@@ -1667,9 +1640,10 @@
16671640
</ReturnValue>
16681641
<Parameters />
16691642
<Docs>
1670-
<summary>To be added.</summary>
1671-
<returns>To be added.</returns>
1643+
<summary>Copies the contents of this array segment into a new array.</summary>
1644+
<returns>An array containing the data in the current array segment.</returns>
16721645
<remarks>To be added.</remarks>
1646+
<exception cref="T:System.InvalidOperationException"><c>default(ArraySegment&lt;T&gt;)</c> cannot be converted to an array.</exception>
16731647
</Docs>
16741648
</Member>
16751649
</Members>

0 commit comments

Comments
 (0)