@@ -17,7 +17,7 @@ namespace CommunityToolkit.Mvvm.Collections;
1717public static class ObservableGroupedCollectionExtensions
1818{
1919 /// <summary>
20- /// Return the first group with <paramref name="key"/> key.
20+ /// Returns the first group with <paramref name="key"/> key.
2121 /// </summary>
2222 /// <typeparam name="TKey">The type of the group key.</typeparam>
2323 /// <typeparam name="TElement">The type of the items in the collection.</typeparam>
@@ -49,13 +49,13 @@ static void ThrowArgumentExceptionForKeyNotFound()
4949 }
5050
5151 /// <summary>
52- /// Return the first group with <paramref name="key"/> key or null if not found.
52+ /// Returns the first group with <paramref name="key"/> key or <see langword=" null"/> if not found.
5353 /// </summary>
5454 /// <typeparam name="TKey">The type of the group key.</typeparam>
5555 /// <typeparam name="TElement">The type of the items in the collection.</typeparam>
5656 /// <param name="source">The source <see cref="ObservableGroupedCollection{TKey, TElement}"/> instance.</param>
5757 /// <param name="key">The key of the group to query.</param>
58- /// <returns>The first group matching <paramref name="key"/> or null.</returns>
58+ /// <returns>The first group matching <paramref name="key"/> or <see langword=" null"/> .</returns>
5959 /// <exception cref="ArgumentNullException">Thrown if <paramref name="source"/> or <paramref name="key"/> are <see langword="null"/>.</exception>
6060 public static ObservableGroup < TKey , TElement > ? FirstGroupByKeyOrDefault < TKey , TElement > ( this ObservableGroupedCollection < TKey , TElement > source , TKey key )
6161 where TKey : notnull
@@ -65,7 +65,7 @@ static void ThrowArgumentExceptionForKeyNotFound()
6565
6666 if ( source . TryGetList ( out List < ObservableGroup < TKey , TElement > > ? list ) )
6767 {
68- foreach ( ObservableGroup < TKey , TElement > ? group in list )
68+ foreach ( ObservableGroup < TKey , TElement > group in list )
6969 {
7070 if ( EqualityComparer < TKey > . Default . Equals ( group . Key , key ) )
7171 {
@@ -77,12 +77,12 @@ static void ThrowArgumentExceptionForKeyNotFound()
7777 }
7878
7979 [ MethodImpl ( MethodImplOptions . NoInlining ) ]
80- static ObservableGroup < TKey , TElement > ? FirstOrDefaultFallback ( ObservableGroupedCollection < TKey , TElement > source , TKey key )
80+ static ObservableGroup < TKey , TElement > ? FirstGroupByKeyOrDefaultFallback ( ObservableGroupedCollection < TKey , TElement > source , TKey key )
8181 {
8282 return Enumerable . FirstOrDefault < ObservableGroup < TKey , TElement > > ( source , group => EqualityComparer < TKey > . Default . Equals ( group . Key , key ) ) ;
8383 }
8484
85- return FirstOrDefaultFallback ( source , key ) ;
85+ return FirstGroupByKeyOrDefaultFallback ( source , key ) ;
8686 }
8787
8888 /// <summary>
@@ -720,7 +720,7 @@ public static void RemoveGroup<TKey, TValue>(this ObservableGroupedCollection<TK
720720 {
721721 int index = 0 ;
722722
723- foreach ( ObservableGroup < TKey , TValue > ? group in list )
723+ foreach ( ObservableGroup < TKey , TValue > group in list )
724724 {
725725 if ( EqualityComparer < TKey > . Default . Equals ( group . Key , key ) )
726726 {
@@ -739,7 +739,7 @@ static void RemoveGroupFallback(ObservableGroupedCollection<TKey, TValue> source
739739 {
740740 int index = 0 ;
741741
742- foreach ( ObservableGroup < TKey , TValue > ? group in source )
742+ foreach ( ObservableGroup < TKey , TValue > group in source )
743743 {
744744 if ( EqualityComparer < TKey > . Default . Equals ( group . Key , key ) )
745745 {
@@ -776,7 +776,7 @@ public static void RemoveItem<TKey, TValue>(this ObservableGroupedCollection<TKe
776776 {
777777 int index = 0 ;
778778
779- foreach ( ObservableGroup < TKey , TValue > ? group in list )
779+ foreach ( ObservableGroup < TKey , TValue > group in list )
780780 {
781781 if ( EqualityComparer < TKey > . Default . Equals ( group . Key , key ) )
782782 {
@@ -800,7 +800,7 @@ static void RemoveItemFallback(ObservableGroupedCollection<TKey, TValue> source,
800800 {
801801 int index = 0 ;
802802
803- foreach ( ObservableGroup < TKey , TValue > ? group in source )
803+ foreach ( ObservableGroup < TKey , TValue > group in source )
804804 {
805805 if ( EqualityComparer < TKey > . Default . Equals ( group . Key , key ) )
806806 {
0 commit comments