Skip to content

Commit b389557

Browse files
Merge pull request #12409 from dotnet/main
Merge main into live
2 parents 7b50e17 + f1f271d commit b389557

19 files changed

Lines changed: 88 additions & 18 deletions

File tree

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,12 @@
246246
<returns>
247247
<see langword="true" /> if <paramref name="item" /> is found in the <see cref="T:System.Collections.Generic.ICollection`1" />; otherwise, <see langword="false" />.</returns>
248248
<remarks>
249-
<format type="text/markdown"><![CDATA[
250-
251-
## Remarks
252-
Implementations can vary in how they determine equality of objects; for example, <xref:System.Collections.Generic.List%601> uses <xref:System.Collections.Generic.Comparer%601.Default%2A?displayProperty=nameWithType>, whereas <xref:System.Collections.Generic.Dictionary%602> allows the user to specify the <xref:System.Collections.Generic.IComparer%601> implementation to use for comparing keys.
249+
<format type="text/markdown"><![CDATA[
250+
251+
## Remarks
253252
253+
Implementations can vary in how they determine equality of objects; for example, <xref:System.Collections.Generic.List%601> uses <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType>, whereas <xref:System.Collections.Generic.Dictionary%602> allows the user to specify the <xref:System.Collections.Generic.IEqualityComparer%601> implementation to use for comparing keys.
254+
254255
]]></format>
255256
</remarks>
256257
</Docs>
@@ -456,13 +457,14 @@
456457
<returns>
457458
<see langword="true" /> if <paramref name="item" /> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1" />; otherwise, <see langword="false" />. This method also returns <see langword="false" /> if <paramref name="item" /> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1" />.</returns>
458459
<remarks>
459-
<format type="text/markdown"><![CDATA[
460-
461-
## Remarks
462-
Implementations can vary in how they determine equality of objects; for example, <xref:System.Collections.Generic.List%601> uses <xref:System.Collections.Generic.Comparer%601.Default%2A?displayProperty=nameWithType>, whereas, <xref:System.Collections.Generic.Dictionary%602> allows the user to specify the <xref:System.Collections.Generic.IComparer%601> implementation to use for comparing keys.
463-
464-
In collections of contiguous elements, such as lists, the elements that follow the removed element move up to occupy the vacated spot. If the collection is indexed, the indexes of the elements that are moved are also updated. This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hash table.
460+
<format type="text/markdown"><![CDATA[
461+
462+
## Remarks
465463
464+
Implementations can vary in how they determine equality of objects; for example, <xref:System.Collections.Generic.List%601> uses <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType>, whereas, <xref:System.Collections.Generic.Dictionary%602> allows the user to specify the <xref:System.Collections.Generic.IEqualityComparer%601> implementation to use for comparing keys.
465+
466+
In collections of contiguous elements, such as lists, the elements that follow the removed element move up to occupy the vacated spot. If the collection is indexed, the indexes of the elements that are moved are also updated. This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hash table.
467+
466468
]]></format>
467469
</remarks>
468470
<exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1" /> is read-only.</exception>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@
10361036
<format type="text/markdown"><![CDATA[
10371037
10381038
## Remarks
1039-
This method determines equality by using the default equality comparer, as defined by the object's implementation of the <xref:System.IEquatable%601.Equals%2A?displayProperty=nameWithType> method for `T` (the type of values in the list).
1039+
This method determines equality using the default equality comparer <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType> for `T`, the type of values in the list.
10401040
10411041
This method performs a linear search; therefore, this method is an O(*n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>.
10421042
@@ -3411,7 +3411,7 @@ Public Function StartsWith(e As Employee) As Boolean
34113411
<format type="text/markdown"><![CDATA[
34123412
34133413
## Remarks
3414-
If type `T` implements the <xref:System.IEquatable%601> generic interface, the equality comparer is the <xref:System.IEquatable%601.Equals%2A> method of that interface; otherwise, the default equality comparer is <xref:System.Object.Equals%2A?displayProperty=nameWithType>.
3414+
This method determines equality using the default equality comparer <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType> for `T`, the type of values in the list.
34153415
34163416
This method performs a linear search; therefore, this method is an O(*n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>.
34173417

xml/System.Formats.Tar/TarFile.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@
357357
<para>If <paramref name="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
358358
<para>Files of type <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <see cref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
359359
<para>Elevation is required to extract a <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
360+
<para>This method doesn't limit the total extracted size or the number of entries extracted from the archive. When processing archives from untrusted sources, iterate over the entries manually using <see cref="T:System.Formats.Tar.TarReader" />, and validate that the size and the number of entries are within acceptable limits for your scenario.</para>
360361
</remarks>
361362
<exception cref="T:System.ArgumentNullException">
362363
<paramref name="source" /> or <paramref name="destinationDirectoryName" /> is <see langword="null" />.</exception>
@@ -411,6 +412,7 @@ Extracting one of the tar entries would have resulted in a file outside the spec
411412
<para>If <paramref name="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
412413
<para>Files of type <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <see cref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
413414
<para>Elevation is required to extract a <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
415+
<para>This method doesn't limit the total extracted size or the number of entries extracted from the archive. When processing archives from untrusted sources, iterate over the entries manually using <see cref="T:System.Formats.Tar.TarReader" />, and validate that the size and the number of entries are within acceptable limits for your scenario.</para>
414416
</remarks>
415417
<exception cref="T:System.ArgumentNullException">
416418
<paramref name="sourceFileName" /> or <paramref name="destinationDirectoryName" /> is <see langword="null" />.</exception>
@@ -464,6 +466,7 @@ Extracting one of the tar entries would have resulted in a file outside the spec
464466
<para>If <paramref name="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
465467
<para>Files of type <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <see cref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
466468
<para>Elevation is required to extract a <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
469+
<para>This method doesn't limit the total extracted size or the number of entries extracted from the archive. When processing archives from untrusted sources, iterate over the entries manually using <see cref="T:System.Formats.Tar.TarReader" />, and validate that the size and the number of entries are within acceptable limits for your scenario.</para>
467470
<para>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.Formats.Tar.TarFile.ExtractToDirectory(System.IO.Stream,System.String,System.Boolean)" />.</para>
468471
</remarks>
469472
<exception cref="T:System.ArgumentNullException">
@@ -522,6 +525,7 @@ Extracting one of the tar entries would have resulted in a file outside the spec
522525
<para>If <paramref name="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
523526
<para>Files of type <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <see cref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
524527
<para>Elevation is required to extract a <see cref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <see cref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
528+
<para>This method doesn't limit the total extracted size or the number of entries extracted from the archive. When processing archives from untrusted sources, iterate over the entries manually using <see cref="T:System.Formats.Tar.TarReader" />, and validate that the size and the number of entries are within acceptable limits for your scenario.</para>
525529
<para>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.Formats.Tar.TarFile.ExtractToDirectory(System.String,System.String,System.Boolean)" />.</para>
526530
</remarks>
527531
<exception cref="T:System.ArgumentNullException">

xml/System.Numerics/BigInteger.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,8 @@ The individual bytes in the `value` array should be in little-endian order, from
17161716
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
17171717
<remarks>To be added.</remarks>
17181718
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
1719+
<exception cref="T:System.DivideByZeroException">
1720+
<paramref name="right" /> is zero.</exception>
17191721
</Docs>
17201722
</Member>
17211723
<Member MemberName="DivRem">

xml/System.Numerics/IBinaryInteger`1.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@
192192
<summary>Computes the quotient and remainder of two values.</summary>
193193
<returns>The quotient and remainder of <paramref name="left" /> divided by <paramref name="right" />.</returns>
194194
<remarks>To be added.</remarks>
195+
<exception cref="T:System.DivideByZeroException">
196+
<paramref name="right" /> is zero.</exception>
195197
</Docs>
196198
</Member>
197199
<Member MemberName="DivRem">

xml/System/Array.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5574,7 +5574,7 @@
55745574
<format type="text/markdown"><![CDATA[
55755575

55765576
## Remarks
5577-
This method searches all the elements of a one-dimensional array for `value`. To determine whether `value` exists in `array`, the method performs an equality comparison by calling each element's `Equals` method until it finds a match. This means that if the element overrides the <xref:System.Object.Equals(System.Object)?displayProperty=nameWithType> method, that override is called.
5577+
This method searches all the elements of a one-dimensional array for `value`. To determine whether `value` exists in `array`, the method performs an equality comparison by using the default equality comparer <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType>.
55785578

55795579
Because most arrays have a lower bound of zero, this method generally returns -1 if`value` isn't found. In the rare case that the lower bound of the array is equal to <xref:System.Int32.MinValue?displayProperty=nameWithType>(0x80000000) and `value` isn't found, this method returns <xref:System.Int32.MaxValue?displayProperty=nameWithType> (0x7FFFFFFF).
55805580

@@ -5673,7 +5673,7 @@
56735673
<format type="text/markdown"><![CDATA[
56745674

56755675
## Remarks
5676-
This method searches a one-dimensional array from the element at index `startIndex` to the last element. To determine whether `value` exists in `array`, the method performs an equality comparison by calling the `Equals` method of every element until it finds a match. This means that if the element overrides the <xref:System.Object.Equals(System.Object)?displayProperty=nameWithType> method, that override is called.
5676+
This method searches a one-dimensional array from the element at index `startIndex` to the last element. To determine whether `value` exists in `array`, the method performs an equality comparison by using the default equality comparer <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType>.
56775677

56785678
Because most arrays have a lower bound of zero, this method generally returns -1 if `value` isn't found. In the rare case that the lower bound of the array is equal to <xref:System.Int32.MinValue?displayProperty=nameWithType>(0x80000000) and `value` isn't found, this method returns <xref:System.Int32.MaxValue?displayProperty=nameWithType> (0x7FFFFFFF).
56795679

@@ -5783,7 +5783,7 @@
57835783
<format type="text/markdown"><![CDATA[
57845784

57855785
## Remarks
5786-
This method searches the elements of a one-dimensional array from `startIndex` to `startIndex` plus `count` minus 1, if `count` is greater than 0. To determine whether `value` exists in `array`, the method performs an equality comparison by calling the `Equals` method of every element until it finds a match. This means that if the element overrides the <xref:System.Object.Equals%2A?displayProperty=nameWithType> method, that override is called.
5786+
This method searches the elements of a one-dimensional array from `startIndex` to `startIndex` plus `count` minus 1, if `count` is greater than 0. To determine whether `value` exists in `array`, the method performs an equality comparison by using the default equality comparer <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType>.
57875787

57885788
Because most arrays have a lower bound of zero, this method generally returns -1 when `value` isn't found. In the rare case that the lower bound of the array is equal to <xref:System.Int32.MinValue?displayProperty=nameWithType> (0x80000000) and `value` isn't found, this method returns <xref:System.Int32.MaxValue?displayProperty=nameWithType> (0x7FFFFFFF).
57895789

@@ -5889,7 +5889,7 @@
58895889
<format type="text/markdown"><![CDATA[
58905890

58915891
## Remarks
5892-
This method searches all the elements of a one-dimensional array for `value`. To determine whether `value` exists in `array`, the method performs an equality comparison by calling the `T.Equals` method on every element. This means that if `T` overrides the <xref:System.Object.Equals%2A> method, that override is called.
5892+
This method searches all the elements of a one-dimensional array for `value`. To determine whether `value` exists in `array`, the method performs an equality comparison by using the default equality comparer <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType>.
58935893

58945894
This method is an O(`n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
58955895

@@ -5975,7 +5975,7 @@
59755975
<format type="text/markdown"><![CDATA[
59765976

59775977
## Remarks
5978-
This method searches a one-dimensional array from the element at `startIndex` to the end of the array. To determine whether `value` exists in `array`, the method performs an equality comparison by calling the `T.Equals` method on every element. This means that if `T` overrides the <xref:System.Object.Equals%2A> method, that override is called.
5978+
This method searches a one-dimensional array from the element at `startIndex` to the end of the array. To determine whether `value` exists in `array`, the method performs an equality comparison by using the default equality comparer <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType>.
59795979

59805980
If `startIndex` equals <xref:System.Array.Length%2A>,the method returns -1. If `startIndex` is greater than <xref:System.Array.Length%2A?displayProperty=nameWithType>, the method throws an <xref:System.ArgumentOutOfRangeException>.
59815981

@@ -6067,7 +6067,7 @@
60676067
<format type="text/markdown"><![CDATA[
60686068

60696069
## Remarks
6070-
This method searches the elements of a one-dimensional array from `startIndex` to `startIndex` plus `count` minus 1, if `count` is greater than 0. To determine whether `value` exists in `array`, the method performs an equality comparison by calling the `T.Equals` method on every element. This means that if `T` overrides the <xref:System.Object.Equals%2A> method, that override is called.
6070+
This method searches the elements of a one-dimensional array from `startIndex` to `startIndex` plus `count` minus 1, if `count` is greater than 0. To determine whether `value` exists in `array`, the method performs an equality comparison by using the default equality comparer <xref:System.Collections.Generic.EqualityComparer%601.Default?displayProperty=nameWithType>.
60716071

60726072
If `startIndex` equals <xref:System.Array.Length%2A?displayProperty=nameWithType>, the method returns -1. If `startIndex` is greater than <xref:System.Array.Length%2A?displayProperty=nameWithType>, the method throws an <xref:System.ArgumentOutOfRangeException>.
60736073

xml/System/Byte.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,8 @@
710710
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
711711
<remarks>To be added.</remarks>
712712
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
713+
<exception cref="T:System.DivideByZeroException">
714+
<paramref name="right" /> is zero.</exception>
713715
</Docs>
714716
</Member>
715717
<MemberGroup MemberName="Equals">

xml/System/Int128.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,10 @@
651651
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
652652
<remarks>To be added.</remarks>
653653
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
654+
<exception cref="T:System.DivideByZeroException">
655+
<paramref name="right" /> is zero.</exception>
656+
<exception cref="T:System.OverflowException">
657+
<paramref name="left" /> is <see cref="F:System.Int128.MinValue">Int128.MinValue</see> and <paramref name="right" /> is -1.</exception>
654658
</Docs>
655659
</Member>
656660
<Member MemberName="Equals">

xml/System/Int16.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@
791791
<returns>The quotient and remainder of <paramref name="left" /> divided-by <paramref name="right" />.</returns>
792792
<remarks>To be added.</remarks>
793793
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
794+
<exception cref="T:System.DivideByZeroException">
795+
<paramref name="right" /> is zero.</exception>
794796
</Docs>
795797
</Member>
796798
<MemberGroup MemberName="Equals">

0 commit comments

Comments
 (0)