Skip to main content

TrackedAtom<T> class

Namespace: Arlecchino.Atoms.Tracked · Assembly: Arlecchino.Core

An atom whose edits go on the undo stack: the draft being edited, a setting, the selected item — anything a user changed and may want back. AtomHistory picks it up with nothing to register.

public sealed class TrackedAtom<T> : Atom<T>, IReadableAtom<T>

Inherits from Atom<T>
Implements IReadableAtom<T>

Constructors

MemberSummary
TrackedAtom(T, IEqualityComparer<T>)Creates an undoable atom holding a starting value.

Properties

MemberSummary
RecordsHistory

Constructors in detail

TrackedAtom(T, IEqualityComparer<T>)

public TrackedAtom(T initial, IEqualityComparer<T> comparer);

Creates an undoable atom holding a starting value.

Parameters

NameTypeDescription
initialTThe value to start with.
comparerIEqualityComparer<T><T>How to decide that writing to it changed nothing; the default comparer for T is used when omitted.

Properties in detail

RecordsHistory

public virtual bool RecordsHistory { get; }

Type bool