Show / Hide Table of Contents

    Interface IHastingsCareTaker

    Caretaker of memento pattern is responsible for the memento's safekeeping, never operates on or examines the contents of a memento. https://www.dofactory.com/net/memento-design-pattern

    Namespace: Catalyst.Abstractions.P2P.Discovery
    Assembly: Catalyst.Abstractions.dll
    Syntax
    public interface IHastingsCareTaker

    Properties

    | Improve this Doc View Source

    HastingMementoList

    Declaration
    ConcurrentStack<IHastingsMemento> HastingMementoList { get; }
    Property Value
    Type Description
    System.Collections.Concurrent.ConcurrentStack<IHastingsMemento>

    Methods

    | Improve this Doc View Source

    Add(IHastingsMemento)

    Adds a new state from the walk on top of the HastingMementoList.

    Declaration
    void Add(IHastingsMemento hastingsMemento)
    Parameters
    Type Name Description
    IHastingsMemento hastingsMemento
    | Improve this Doc View Source

    Get()

    Gets the last state of the walk from the queue and pops it off the HastingMementoList.

    Declaration
    IHastingsMemento Get()
    Returns
    Type Description
    IHastingsMemento
    Exceptions
    Type Condition
    System.InvalidOperationException

    When the HastingMementoList is empty.

    | Improve this Doc View Source

    Peek()

    Returns the item at the top of the top of the HastingMementoList without popping it.

    Declaration
    IHastingsMemento Peek()
    Returns
    Type Description
    IHastingsMemento

    The memento currently at the top of the queue if any.

    Exceptions
    Type Condition
    System.InvalidOperationException

    When the HastingMementoList is empty.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Catalyst Network