Class ScrollerBase<T>

Interface for generic scrollers.

Inheritance
object
ScrollerBase<T>
Implements
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsQuerying
Assembly: Stylelabs.M.Sdk.dll
Syntax
RequestResponse
public abstract class ScrollerBase<T> : IScroller<T>, IScroller where T : class, IScrollResult
Type Parameters
NameDescription
T

Type of scroll result.

Constructors

ScrollerBase(IScrollEngine<T>, Query, IQueryLoadConfiguration, TimeSpan)

Initializes a new instance of the ScrollerBase<T> class.

Declaration
RequestResponse
protected ScrollerBase(IScrollEngine<T> engine, Query query, IQueryLoadConfiguration loadConfiguration, TimeSpan scrollTime)
Parameters
TypeNameDescription
IScrollEngineengine

The scroll engine.

Queryquery

The query.

IQueryLoadConfigurationloadConfiguration

The load configuration.

TimeSpanscrollTime

The scroll time.

Properties

Current

Gets the current result during scrolling.

Declaration
RequestResponse
public T Current { get; protected set; }
Property Value
TypeDescription
T

Query

Gets the query.

Declaration
RequestResponse
protected Query Query { get; }
Property Value
TypeDescription
Query

Methods

CanMoveNext()

Checks if the iterator can move further through the results.

Declaration
RequestResponse
public bool CanMoveNext()
Returns
TypeDescription
bool

true if there more results.

MoveNextAsync()

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

Declaration
RequestResponse
public Task<bool> MoveNextAsync()
Returns
TypeDescription
Task<>bool

true 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
RequestResponse
public void Reset()

Explicit Interface Implementations

IScroller.Current

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

Declaration
RequestResponse
IScrollResult IScroller.Current { get; }
Returns
TypeDescription
IScrollResult

Implements

Do you have some feedback for us?

If you have suggestions for improving this article,