Class VirtualStorageExtensions
Provides extension methods for various operations on collections in the Virtual Storage Library.
Inherited Members
Namespace: AkiraNetwork.VirtualStorageLibrary
Assembly: VirtualStorageLibrary.dll
Syntax
public static class VirtualStorageExtensions
Methods
ApplySortConditions<T>(IEnumerable<T>, List<VirtualSortCondition<T>>?)
Applies the specified sort conditions to the elements of the source sequence.
Declaration
public static IEnumerable<T> ApplySortConditions<T>(this IEnumerable<T> source, List<VirtualSortCondition<T>>? sortConditions = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | source | The sequence of elements to sort. |
List<VirtualSortCondition<T>> | sortConditions | A list of conditions that define the sort order. If null or empty, no sorting is applied. |
Returns
Type | Description |
---|---|
IEnumerable<T> | An IEnumerable<T> containing the sorted elements. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in the source sequence. |
GroupAndSort<T>(IEnumerable<T>, VirtualGroupCondition<T, object>?, List<VirtualSortCondition<T>>?)
Groups and sorts the elements of the source sequence based on the specified conditions.
Declaration
public static IEnumerable<T> GroupAndSort<T>(this IEnumerable<T> source, VirtualGroupCondition<T, object>? groupCondition = null, List<VirtualSortCondition<T>>? sortConditions = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | source | The sequence of elements to group and sort. |
VirtualGroupCondition<T, object> | groupCondition | The condition that defines how to group the elements. If null, no grouping is applied. |
List<VirtualSortCondition<T>> | sortConditions | A list of conditions that define the sort order. If null or empty, no sorting is applied. |
Returns
Type | Description |
---|---|
IEnumerable<T> | An IEnumerable<T> containing the grouped and sorted elements. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in the source sequence. |