Skip to content

Commit 03d9202

Browse files
Add missing System.Linq API docs (dotnet#59038)
1 parent edeb905 commit 03d9202

2 files changed

Lines changed: 41 additions & 3 deletions

File tree

src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ public static IQueryable<TSource> DistinctBy<TSource, TKey>(this IQueryable<TSou
686686
/// <param name="source">An <see cref="IEnumerable{T}"/> whose elements to chunk.</param>
687687
/// <param name="size">Maximum size of each chunk.</param>
688688
/// <typeparam name="TSource">The type of the elements of source.</typeparam>
689-
/// <returns>An <see cref="IEnumerable{T}"/> that contains the elements the input sequence split into chunks of size <paramref name="size"/>.</returns>
689+
/// <returns>An <see cref="IQueryable{T}"/> that contains the elements the input sequence split into chunks of size <paramref name="size"/>.</returns>
690690
/// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
691691
/// <exception cref="ArgumentOutOfRangeException"><paramref name="size"/> is below 1.</exception>
692692
/// <remarks>
@@ -823,7 +823,7 @@ public static IQueryable<TSource> Union<TSource>(this IQueryable<TSource> source
823823
/// <param name="source1">An <see cref="IQueryable{T}" /> whose distinct elements form the first set for the union.</param>
824824
/// <param name="source2">An <see cref="IEnumerable{T}" /> whose distinct elements form the second set for the union.</param>
825825
/// <param name="keySelector">A function to extract the key for each element.</param>
826-
/// <returns>An <see cref="IEnumerable{T}" /> that contains the elements from both input sequences, excluding duplicates.</returns>
826+
/// <returns>An <see cref="IQueryable{T}" /> that contains the elements from both input sequences, excluding duplicates.</returns>
827827
/// <exception cref="ArgumentNullException"><paramref name="source1" /> or <paramref name="source2" /> is <see langword="null" />.</exception>
828828
[DynamicDependency("UnionBy`2", typeof(Enumerable))]
829829
public static IQueryable<TSource> UnionBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, Expression<Func<TSource, TKey>> keySelector)
@@ -849,7 +849,7 @@ public static IQueryable<TSource> UnionBy<TSource, TKey>(this IQueryable<TSource
849849
/// <param name="source2">An <see cref="IEnumerable{T}" /> whose distinct elements form the second set for the union.</param>
850850
/// <param name="keySelector">A function to extract the key for each element.</param>
851851
/// <param name="comparer">The <see cref="IEqualityComparer{T}" /> to compare values.</param>
852-
/// <returns>An <see cref="IEnumerable{T}" /> that contains the elements from both input sequences, excluding duplicates.</returns>
852+
/// <returns>An <see cref="IQueryable{T}" /> that contains the elements from both input sequences, excluding duplicates.</returns>
853853
/// <exception cref="ArgumentNullException"><paramref name="source1" /> or <paramref name="source2" /> is <see langword="null" />.</exception>
854854
[DynamicDependency("UnionBy`2", typeof(Enumerable))]
855855
public static IQueryable<TSource> UnionBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
@@ -991,6 +991,15 @@ public static IQueryable<TSource> Except<TSource>(this IQueryable<TSource> sourc
991991
));
992992
}
993993

994+
/// <summary>
995+
/// Produces the set difference of two sequences according to a specified key selector function.
996+
/// </summary>
997+
/// <typeparam name="TSource">The type of the elements of the input sequence.</typeparam>
998+
/// <typeparam name="TKey">The type of key to identify elements by.</typeparam>
999+
/// <param name="source1">An <see cref="IQueryable{TSource}" /> whose keys that are not also in <paramref name="source2"/> will be returned.</param>
1000+
/// <param name="source2">An <see cref="IEnumerable{TKey}" /> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.</param>
1001+
/// <param name="keySelector">A function to extract the key for each element.</param>
1002+
/// <returns>A <see cref="IQueryable{TSource}" /> that contains the set difference of the elements of two sequences.</returns>
9941003
[DynamicDependency("ExceptBy`2", typeof(Enumerable))]
9951004
public static IQueryable<TSource> ExceptBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector)
9961005
{
@@ -1010,6 +1019,16 @@ public static IQueryable<TSource> ExceptBy<TSource, TKey>(this IQueryable<TSourc
10101019
));
10111020
}
10121021

1022+
/// <summary>
1023+
/// Produces the set difference of two sequences according to a specified key selector function.
1024+
/// </summary>
1025+
/// <typeparam name="TSource">The type of the elements of the input sequence.</typeparam>
1026+
/// <typeparam name="TKey">The type of key to identify elements by.</typeparam>
1027+
/// <param name="source1">An <see cref="IQueryable{TSource}" /> whose keys that are not also in <paramref name="source2"/> will be returned.</param>
1028+
/// <param name="source2">An <see cref="IEnumerable{TKey}" /> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.</param>
1029+
/// <param name="keySelector">A function to extract the key for each element.</param>
1030+
/// <param name="comparer">An <see cref="IEqualityComparer{TKey}" /> to compare keys.</param>
1031+
/// <returns>A <see cref="IQueryable{TSource}" /> that contains the set difference of the elements of two sequences.</returns>
10131032
[DynamicDependency("ExceptBy`2", typeof(Enumerable))]
10141033
public static IQueryable<TSource> ExceptBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
10151034
{

src/libraries/System.Linq/src/System/Linq/Except.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,27 @@ public static IEnumerable<TSource> Except<TSource>(this IEnumerable<TSource> fir
3737
return ExceptIterator(first, second, comparer);
3838
}
3939

40+
/// <summary>
41+
/// Produces the set difference of two sequences according to a specified key selector function.
42+
/// </summary>
43+
/// <typeparam name="TSource">The type of the elements of the input sequence.</typeparam>
44+
/// <typeparam name="TKey">The type of key to identify elements by.</typeparam>
45+
/// <param name="first">An <see cref="IEnumerable{TSource}" /> whose keys that are not also in <paramref name="second"/> will be returned.</param>
46+
/// <param name="second">An <see cref="IEnumerable{TKey}" /> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.</param>
47+
/// <param name="keySelector">A function to extract the key for each element.</param>
48+
/// <returns>A sequence that contains the set difference of the elements of two sequences.</returns>
4049
public static IEnumerable<TSource> ExceptBy<TSource, TKey>(this IEnumerable<TSource> first, IEnumerable<TKey> second, Func<TSource, TKey> keySelector) => ExceptBy(first, second, keySelector, null);
4150

51+
/// <summary>
52+
/// Produces the set difference of two sequences according to a specified key selector function.
53+
/// </summary>
54+
/// <typeparam name="TSource">The type of the elements of the input sequence.</typeparam>
55+
/// <typeparam name="TKey">The type of key to identify elements by.</typeparam>
56+
/// <param name="first">An <see cref="IEnumerable{TSource}" /> whose keys that are not also in <paramref name="second"/> will be returned.</param>
57+
/// <param name="second">An <see cref="IEnumerable{TKey}" /> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.</param>
58+
/// <param name="keySelector">A function to extract the key for each element.</param>
59+
/// <param name="comparer">The <see cref="IEqualityComparer{TKey}" /> to compare values.</param>
60+
/// <returns>A sequence that contains the set difference of the elements of two sequences.</returns>
4261
public static IEnumerable<TSource> ExceptBy<TSource, TKey>(this IEnumerable<TSource> first, IEnumerable<TKey> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer)
4362
{
4463
if (first is null)

0 commit comments

Comments
 (0)