JumpListHelperToGroupsTSource, TSort, TGroup Method |
Groups and sorts into a list of group lists based on a selector.
Namespace: foodez.Common.JumpListAssembly: foodez.WindowsPhone (in foodez.WindowsPhone.exe) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static List<JumpListGroup<TSource>> ToGroups<TSource, TSort, TGroup>(
this IEnumerable<TSource> source,
Func<TSource, TSort> sortSelector,
Func<TSource, TGroup> groupSelector,
bool isSortDescending = false
)
<ExtensionAttribute>
Public Shared Function ToGroups(Of TSource, TSort, TGroup) (
source As IEnumerable(Of TSource),
sortSelector As Func(Of TSource, TSort),
groupSelector As Func(Of TSource, TGroup),
Optional isSortDescending As Boolean = false
) As List(Of JumpListGroup(Of TSource))
public:
[ExtensionAttribute]
generic<typename TSource, typename TSort, typename TGroup>
static List<JumpListGroup<TSource>^>^ ToGroups(
IEnumerable<TSource>^ source,
Func<TSource, TSort>^ sortSelector,
Func<TSource, TGroup>^ groupSelector,
bool isSortDescending = false
)
[<ExtensionAttribute>]
static member ToGroups :
source : IEnumerable<'TSource> *
sortSelector : Func<'TSource, 'TSort> *
groupSelector : Func<'TSource, 'TGroup> *
?isSortDescending : bool
(* Defaults:
let _isSortDescending = defaultArg isSortDescending false
*)
-> List<JumpListGroup<'TSource>>
Parameters
- source
- Type: System.Collections.GenericIEnumerableTSource
List to be grouped and sorted - sortSelector
- Type: SystemFuncTSource, TSort
A selector that provides the value that items will be sorted by. - groupSelector
- Type: SystemFuncTSource, TGroup
A selector that provides the value that items will be grouped by. - isSortDescending (Optional)
- Type: SystemBoolean
Value indicating to sort groups in reverse. Items in group will still sort ascending.
Type Parameters
- TSource
- Type of the items in the list.
- TSort
- Type of value returned by sortSelector.
- TGroup
- Type of value returned by groupSelector.
Return Value
Type:
ListJumpListGroupTSourceA list of JumpListGroups.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also