1. Stylelabs.M.Sdk.Models.Querying

Class ScrollerBase

Interface for generic scrollers.

Inheritance

object

ScrollerBase

EntityIdScroller

EntityScroller

Implements

IScroller

IScroller

Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsQuerying

Assembly: Stylelabs.M.Sdk.dll

Syntax

public abstract class ScrollerBase<T> : IScroller<T>, IScroller where T : class, IScrollResult

Type Parameters

NameDescription
TType of scroll result.

Constructors

ScrollerBase(IScrollEngine, Query, IQueryLoadConfiguration, TimeSpan)

Initializes a new instance of the ScrollerBase class.

Declaration

protected ScrollerBase(IScrollEngine<T> engine, Query query, IQueryLoadConfiguration loadConfiguration, TimeSpan scrollTime)

Parameters

TypeNameDescription
IScrollEngineengineThe scroll engine.
QueryqueryThe query.
IQueryLoadConfigurationloadConfigurationThe load configuration.
TimeSpanscrollTimeThe scroll time.

Properties

Current

Gets the current result during scrolling.

Declaration

public T Current { get; protected set; }

Property Value

TypeDescription
T

Gets the query.

Declaration

protected Query Query { get; }

Property Value

TypeDescription
Query

Methods

CanMoveNext()

Checks if the iterator can move further through the results.

Declaration

public bool CanMoveNext()

Returns

TypeDescription
booltrue if there more results.

MoveNextAsync()

Advances the scroller to the next batch of the collection. The result will be available in Current.

Declaration

public Task<bool> MoveNextAsync()

Returns

TypeDescription
Task<>booltrue if the scroller was successfully advanced to the next batch. false if the scroller has passed the end of the collection.

Reset()

Resets the scroller to start before the first result again.

Declaration

public void Reset()

Explicit Interface Implementations

IScroller.Current

Gets the current result. This is initially null. Use MoveNextAsync() first.

Declaration

IScrollResult IScroller.Current { get; }

Returns

TypeDescription
IScrollResult

Implements

IScroller

IScroller

If you have suggestions for improving this article, let us know!