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
| Member | Summary |
|---|---|
TrackedAtom(T, IEqualityComparer<T>) | Creates an undoable atom holding a starting value. |
Properties
| Member | Summary |
|---|---|
RecordsHistory |
Constructors in detail
TrackedAtom(T, IEqualityComparer<T>)
public TrackedAtom(T initial, IEqualityComparer<T> comparer);
Creates an undoable atom holding a starting value.
Parameters
| Name | Type | Description |
|---|---|---|
initial | T | The value to start with. |
comparer | IEqualityComparer<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