Class PagedCollection
Represents a way of setting default values for the PagedCollection<T> class.
Namespace: Cuemon.Collections.Generic
Assembly: Cuemon.Core.dll
Syntax
public class PagedCollection
Constructors
| Improve this DocPagedCollection()
Initializes a new instance of the PagedCollection class.
Declaration
protected PagedCollection()
Methods
| Improve this DocSearch<T>(IEnumerable<T>, Func<T, PagedSettings, StringComparison, Boolean>, PagedSettings)
Retrieves all the elements in source
that match the conditions defined by the specified function delegate match
.
Declaration
public static PagedCollection<T> Search<T>(IEnumerable<T> source, Func<T, PagedSettings, StringComparison, bool> match, PagedSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | source | The sequence to search and apply paging on. |
System.Func<T, PagedSettings, System.StringComparison, System.Boolean> | match | The function delegate that defines the conditions of the elements to search for. |
PagedSettings | settings | The settings that specifies the conditions of the |
Returns
Type | Description |
---|---|
PagedCollection<T> | A PagedCollection<T> that is the result of |
Type Parameters
Name | Description |
---|---|
T |
Remarks
This search is performed by using a default value of System.StringComparison.OrdinalIgnoreCase.
Search<T>(IEnumerable<T>, Func<T, PagedSettings, StringComparison, Boolean>, PagedSettings, StringComparison)
Retrieves all the elements in source
that match the conditions defined by the specified function delegate match
.
Declaration
public static PagedCollection<T> Search<T>(IEnumerable<T> source, Func<T, PagedSettings, StringComparison, bool> match, PagedSettings settings, StringComparison comparison)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | source | The sequence to search and apply paging on. |
System.Func<T, PagedSettings, System.StringComparison, System.Boolean> | match | The function delegate that defines the conditions of the elements to search for. |
PagedSettings | settings | The settings that specifies the conditions of the |
System.StringComparison | comparison | One of the enumeration values that specifies the rules to use in the comparison. |
Returns
Type | Description |
---|---|
PagedCollection<T> | A PagedCollection<T> that is the result of |
Type Parameters
Name | Description |
---|---|
T |
Sort<T>(IEnumerable<T>, Func<IEnumerable<T>, PagedSettings, IEnumerable<T>>, PagedSettings)
Sort all the elements in source
by the settings
applied to the specified function delegate sorter
.
Declaration
public static PagedCollection<T> Sort<T>(IEnumerable<T> source, Func<IEnumerable<T>, PagedSettings, IEnumerable<T>> sorter, PagedSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | source | The sequence to sort and apply paging on. |
System.Func<System.Collections.Generic.IEnumerable<T>, PagedSettings, System.Collections.Generic.IEnumerable<T>> | sorter | The function delegate that defines how the sorting is applied to the elements in |
PagedSettings | settings | The settings that specifies the conditions of the |
Returns
Type | Description |
---|---|
PagedCollection<T> | A PagedCollection<T> that is sorted by the specified |
Type Parameters
Name | Description |
---|---|
T |