Method ReadPaged
- Namespace
- Skyline.DataMiner.Utils.DOM.Extensions
- Assembly
- Skyline.DataMiner.Utils.DOM.dll
ReadPaged<T>(ICrudHelperComponent<T>, FilterElement<T>, long)
Reads data from the helper in a paged manner using a specified filter.
public static IEnumerable<IEnumerable<T>> ReadPaged<T>(this ICrudHelperComponent<T> helper, FilterElement<T> filter, long pageSize = 500) where T : DataType
Parameters
helper
ICrudHelperComponent<T>The helper component used to retrieve data.
filter
FilterElement<T>The filter criteria to apply.
pageSize
longThe size of each page to retrieve.
Returns
- IEnumerable<IEnumerable<T>>
An enumerable collection of data elements.
Type Parameters
T
The type of the data elements.
Exceptions
- ArgumentNullException
Thrown when
helper
orfilter
is null.
ReadPaged<T>(ICrudHelperComponent<T>, IQuery<T>, long)
Reads items in a paged manner, based on the specified query and page size.
public static IEnumerable<IEnumerable<T>> ReadPaged<T>(this ICrudHelperComponent<T> helper, IQuery<T> query, long pageSize = 500) where T : DataType
Parameters
helper
ICrudHelperComponent<T>The helper component for CRUD operations.
query
IQuery<T>The query to apply to the data.
pageSize
longThe number of items per page.
Returns
- IEnumerable<IEnumerable<T>>
An enumerable collection of the queried data.
Type Parameters
T
The type of data to read.
Exceptions
- ArgumentNullException
Thrown when helper or query is null.