Show / Hide Table of Contents

    Class TransactionalList<T>

    Wraps the changes being made to the underlying List<T> into a transaction.

    Inheritance
    object
    TransactionalList<T>
    InMemoryInboundLog
    InMemoryOutbox
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Util
    Assembly: Silverback.Integration.dll
    Syntax
    public abstract class TransactionalList<T> where T : class
    Type Parameters
    Name Description
    T

    The type of the items in the list.

    Constructors

    | Improve this doc View source

    TransactionalList(TransactionalListSharedItems<T>)

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

    Declaration
    protected TransactionalList(TransactionalListSharedItems<T> sharedItems)
    Parameters
    Type Name Description
    TransactionalListSharedItems<T> sharedItems

    The items shared between the instances of this repository.

    Properties

    | Improve this doc View source

    CommittedItemsCount

    Gets the number of items currently in the list, ignoring the uncommitted changes.

    Declaration
    public int CommittedItemsCount { get; }
    Property Value
    Type Description
    int
    | Improve this doc View source

    Items

    Gets the underlying List<T> containing the persisted items, wrapped into a TransactionalListItem<T>.

    Declaration
    protected IList<TransactionalListItem<T>> Items { get; }
    Property Value
    Type Description
    IList<TransactionalListItem<T>>
    | Improve this doc View source

    UncommittedItems

    Gets the List<T> containing the pending items that will be persisted when Commit is called.

    Declaration
    protected IList<TransactionalListItem<T>> UncommittedItems { get; }
    Property Value
    Type Description
    IList<TransactionalListItem<T>>

    Methods

    | Improve this doc View source

    AddAsync(T)

    Adds the specified item to the list.

    Declaration
    protected Task AddAsync(T item)
    Parameters
    Type Name Description
    T item

    The item to be added.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    | Improve this doc View source

    CommitAsync()

    Called to commit the pending changes.

    Declaration
    public virtual Task CommitAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    | Improve this doc View source

    RemoveAsync(T)

    Removes the specified item to the list.

    Declaration
    protected Task RemoveAsync(T item)
    Parameters
    Type Name Description
    T item

    The item to be added.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    | Improve this doc View source

    RollbackAsync()

    Called to rollback the pending changes.

    Declaration
    public virtual Task RollbackAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini