---
title: "Class ScrollerBase<T>"
slug: "sdk--stylelabs.m.sdk.models.querying.scrollerbase-1"
abstract: ""
---
# Class ScrollerBase<T>

Interface for generic scrollers.

## Inheritance

object

ScrollerBase<T>

[EntityIdScroller](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.querying.entityidscroller.html)

[EntityScroller](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.querying.entityscroller.html)

## Implements

[IScroller](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.querying.generic.iscroller-1.html)

[IScroller](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.querying.iscroller.html)

## Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsQuerying

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
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>](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.querying.scrollerbase-1.html) class.

#### Declaration

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

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [IScrollEngine](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.querying.iscrollengine-1.html) | engine | The scroll engine. |
| [Query](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.query.html) | query | The query. |
| [IQueryLoadConfiguration](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadconfigurations.iqueryloadconfiguration.html) | loadConfiguration | The load configuration. |
| TimeSpan | scrollTime | The scroll time. |

## Properties

### Current

Gets the current result during scrolling.

#### Declaration

```csharp
public T Current { get; protected set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| T |  |

### [Query](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.query.html)

Gets the query.

#### Declaration

```csharp
protected Query Query { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| [Query](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.query.html) |  |

## Methods

### CanMoveNext()

Checks if the iterator can move further through the results.

#### Declaration

```csharp
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](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.querying.iscroller.html).

#### Declaration

```csharp
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

```csharp
public void Reset()
```

### Explicit Interface Implementations

### IScroller.Current

Gets the current result. This is initially null. Use [MoveNextAsync()](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.querying.iscroller.html) first.

#### Declaration

```csharp
IScrollResult IScroller.Current { get; }
```

#### Returns

| Type | Description |
| --- | --- |
| [IScrollResult](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.querying.iscrollresult.html) |  |

### Implements

[IScroller<T>](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.querying.generic.iscroller-1.html)

[IScroller](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.querying.iscroller.html)
