Skip to content

Commit a14f1e3

Browse files
author
Ron Petrusha
authored
Added exception information to SingleOrDefault (dotnet#4650)
1 parent a87fd06 commit a14f1e3

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

xml/System.Linq/Enumerable.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8066,6 +8066,8 @@ From i As Integer In objects
80668066
</remarks>
80678067
<exception cref="T:System.ArgumentNullException">
80688068
<paramref name="source" /> or <paramref name="predicate" /> is <see langword="null" />.</exception>
8069+
<exception cref="T:System.InvalidOperationException">
8070+
More than one element satisfies the condition in <paramref name="predicate" />. </exception>
80698071
</Docs>
80708072
</Member>
80718073
<Member MemberName="Skip&lt;TSource&gt;">

xml/System.Linq/ImmutableArrayExtensions.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,11 +991,12 @@
991991
</Parameters>
992992
<Docs>
993993
<typeparam name="T">The type of element contained by the collection.</typeparam>
994-
<param name="immutableArray">To be added.</param>
994+
<param name="immutableArray">The array.</param>
995995
<summary>
996996

997997
Returns the only element of the array, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.</summary>
998998
<returns>The element in the array, or the default value if the array is empty.</returns>
999+
<exception cref="T:System.InvalidOperationException"><paramref name="source" /> contains more than one element.</exception>
9991000
<remarks>To be added.</remarks>
10001001
</Docs>
10011002
</Member>
@@ -1029,6 +1030,7 @@
10291030
Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.</summary>
10301031
<returns>The element if it satisfies the specified condition; otherwise the default element.</returns>
10311032
<remarks>To be added.</remarks>
1033+
<exception cref="T:System.InvalidOperationException">More than one element satisfies the condition in <paramref name="predicate" />. </exception>
10321034
</Docs>
10331035
</Member>
10341036
<Member MemberName="ToArray&lt;T&gt;">

xml/System.Linq/ParallelEnumerable.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6740,6 +6740,7 @@
67406740
<exception cref="T:System.OperationCanceledException">The query was canceled with the token passed in through <paramref name="WithCancellation" />.</exception>
67416741
<exception cref="T:System.ArgumentNullException">
67426742
<paramref name="source" /> is a null reference (Nothing in Visual Basic).</exception>
6743+
<exception cref="T:System.InvalidOperationException"><paramref name="source" /> has more than one element. </exception>
67436744
<exception cref="T:System.AggregateException">One or more exceptions occurred during the evaluation of the query.</exception>
67446745
</Docs>
67456746
</Member>

0 commit comments

Comments
 (0)