logo
logo
  • Interface IIterator

    Base interface for iterators.

    Namespace: Stylelabs.M.Sdk.Contracts.Base
    Assembly: Stylelabs.M.Sdk.dll
    Syntax
    public interface IIterator

    Properties

    Current

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

    Declaration
    object Current { get; }
    Property Value
    Type Description
    System.Object

    Methods

    CanMoveNext()

    Checks if the iterator can move further through the results.

    Declaration
    bool CanMoveNext()
    Returns
    Type Description
    System.Boolean

    true if there more results.

    CanMovePrevious()

    Checks if the iterator can move backwards through the results.

    Declaration
    bool CanMovePrevious()
    Returns
    Type Description
    System.Boolean

    true if there move backwards.

    MoveNextAsync()

    Advances the enumerator to the next page/batch of the collection. The result will be available in Current.

    Declaration
    Task<bool> MoveNextAsync()
    Returns
    Type Description
    Task<System.Boolean>

    true if the enumerator was successfully advanced to the next page; false if the enumerator has passed the end of the collection.

    MovePreviousAsync()

    Moves the enumerator backwards, to the previous page/batch of the collection. The result will be available in Current.

    Declaration
    Task<bool> MovePreviousAsync()
    Returns
    Type Description
    Task<System.Boolean>

    true if the enumerator was successfully advanced to the previous page; false if the enumerator has passed the start of the collection.

    Reset()

    Resets the iterator to start before the first result again.

    Declaration
    void Reset()

    Can we improve this article ? Provide feedback