Class ScrollerBase<T>
Interface for generic scrollers.
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
Name | Description |
---|---|
T |
Type of scroll result. |
Constructors
ScrollerBase(IScrollEngine<T>, Query, IQueryLoadConfiguration, TimeSpan)
Initializes a new instance of the ScrollerBase<T> class.
Declaration
protected ScrollerBase(IScrollEngine<T> engine, Query query, IQueryLoadConfiguration loadConfiguration, TimeSpan scrollTime)
Parameters
Type | Name | Description |
---|---|---|
IScrollEngine | engine |
The scroll engine. |
Query | query |
The query. |
IQueryLoadConfiguration | loadConfiguration |
The load configuration. |
TimeSpan | scrollTime |
The scroll time. |
Properties
Current
Gets the current result during scrolling.
Declaration
public T Current { get; protected set; }
Property Value
Type | Description |
---|---|
T |
Query
Gets the query.
Declaration
protected Query Query { get; }
Property Value
Type | Description |
---|---|
Query |
Methods
CanMoveNext()
Checks if the iterator can move further through the results.
Declaration
public bool CanMoveNext()
Returns
Type | Description |
---|---|
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
public Task<bool> MoveNextAsync()
Returns
Type | Description |
---|---|
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
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
Type | Description |
---|---|
IScrollResult |