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
helperICrudHelperComponent<T>The helper component used to retrieve data.
filterFilterElement<T>The filter criteria to apply.
pageSizelongThe size of each page to retrieve.
Returns
- IEnumerable<IEnumerable<T>>
An enumerable collection of data elements.
Type Parameters
TThe type of the data elements.
Exceptions
- ArgumentNullException
Thrown when
helperorfilteris 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
helperICrudHelperComponent<T>The helper component for CRUD operations.
queryIQuery<T>The query to apply to the data.
pageSizelongThe number of items per page.
Returns
- IEnumerable<IEnumerable<T>>
An enumerable collection of the queried data.
Type Parameters
TThe type of data to read.
Exceptions
- ArgumentNullException
Thrown when helper or query is null.
ReadPaged<T, K>(ISelectHelperComponent<T, K>, FilterElement<T>, SelectedFields<T>, int)
Reads a selected subset of fields in a paged manner using a specified filter.
public static IEnumerable<IEnumerable<PartialObject<T, K>>> ReadPaged<T, K>(this ISelectHelperComponent<T, K> helper, FilterElement<T> filter, SelectedFields<T> fields, int pageSize = 500) where T : IManagerIdentifiableObject<K>, DataType where K : IEquatable<K>
Parameters
helperISelectHelperComponent<T, K>The helper component used to retrieve data.
filterFilterElement<T>The filter criteria to apply.
fieldsSelectedFields<T>The fields to retrieve.
pageSizeintThe size of each page to retrieve.
Returns
- IEnumerable<IEnumerable<PartialObject<T, K>>>
An enumerable collection of pages with partial objects.
Type Parameters
TThe type of the data elements.
KThe type of the identifier for the data elements.
Exceptions
- ArgumentNullException
Thrown when
helper,filterorfieldsis null.
ReadPaged<T, K>(ISelectHelperComponent<T, K>, IQuery<T>, SelectedFields<T>, int)
Reads a selected subset of fields in a paged manner using a specified query.
public static IEnumerable<IEnumerable<PartialObject<T, K>>> ReadPaged<T, K>(this ISelectHelperComponent<T, K> helper, IQuery<T> query, SelectedFields<T> fields, int pageSize = 500) where T : IManagerIdentifiableObject<K>, DataType where K : IEquatable<K>
Parameters
helperISelectHelperComponent<T, K>The helper component used to retrieve data.
queryIQuery<T>The query to apply to the data.
fieldsSelectedFields<T>The fields to retrieve.
pageSizeintThe size of each page to retrieve.
Returns
- IEnumerable<IEnumerable<PartialObject<T, K>>>
An enumerable collection of pages with partial objects.
Type Parameters
TThe type of the data elements.
KThe type of the identifier for the data elements.
Exceptions
- ArgumentNullException
Thrown when
helper,queryorfieldsis null.