Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ListStore<T> Class

    Namespace: Stride.Core.IO
    Assembly: Stride.Core.Serialization.dll

    A value store that will be incrementally saved on HDD. Thread-safe and process-safe.

    System.Object → Store<T> → ListStore<T>
    Derived from ListStore<T>:

    public class ListStore<T> : Store<T>, IDisposable where T : new()
    Type Parameters
    Name Description
    T

    The type of elements in the store.

    Name Description
    Constructors
    ListStore(Stream)
    Fields
    loadedIdMap
    unsavedIdMap
    Methods
    AddLoaded(T)
    AddUnsaved(T, Int32)
    GetPendingItems(Int32)
    GetValues()
    RemoveUnsaved(T, Int32)
    RemoveUnsaved(IEnumerable<T>, Int32)
    | Improve this Doc View Source

    Constructors


    ListStore(Stream)

    public ListStore(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream
    | Improve this Doc View Source

    Fields


    loadedIdMap

    protected readonly List<T> loadedIdMap
    Field Value
    Type Description
    System.Collections.Generic.List<T>

    unsavedIdMap

    protected readonly LinkedList<ListStore<T>.UnsavedEntry> unsavedIdMap
    Field Value
    Type Description
    System.Collections.Generic.LinkedList<ListStore.UnsavedEntry<>>
    | Improve this Doc View Source

    Methods


    AddLoaded(T)

    protected override void AddLoaded(T item)
    Parameters
    Type Name Description
    T item
    Overrides
    Stride.Core.IO.Store<T>.AddLoaded(T)

    AddUnsaved(T, Int32)

    protected override void AddUnsaved(T item, int currentTransaction)
    Parameters
    Type Name Description
    T item
    System.Int32 currentTransaction
    Overrides
    Stride.Core.IO.Store<T>.AddUnsaved(T, System.Int32)

    GetPendingItems(Int32)

    protected override IEnumerable<T> GetPendingItems(int currentTransaction)
    Parameters
    Type Name Description
    System.Int32 currentTransaction
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Overrides
    Stride.Core.IO.Store<T>.GetPendingItems(System.Int32)

    GetValues()

    public T[] GetValues()
    Returns
    Type Description
    T[]

    RemoveUnsaved(T, Int32)

    protected override void RemoveUnsaved(T item, int currentTransaction)
    Parameters
    Type Name Description
    T item
    System.Int32 currentTransaction
    Overrides
    Stride.Core.IO.Store<T>.RemoveUnsaved(T, System.Int32)

    RemoveUnsaved(IEnumerable<T>, Int32)

    protected override void RemoveUnsaved(IEnumerable<T> items, int currentTransaction)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> items
    System.Int32 currentTransaction
    Overrides
    Stride.Core.IO.Store<T>.RemoveUnsaved(System.Collections.Generic.IEnumerable<T>, System.Int32)

    Inherited Members

    Store<T>.stream
    Store<T>.transaction
    Store<T>.lockObject
    Store<T>.UseTransaction
    Store<T>.AutoLoadNewValues
    Store<T>.Dispose()
    Store<T>.AddValues(IEnumerable<T>)
    Store<T>.AddValue(T)
    Store<T>.Save()
    Store<T>.Reset()
    Store<T>.ResetInternal()
    Store<T>.LoadNewValues()
    Store<T>.BuildContext(Stream)
    Store<T>.ReadEntries(Stream)
    Store<T>.WriteEntry(Stream, T)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation