Struct Transition<TLinkAddress>
- Namespace
- Foundation.Data.Doublets.Cli
- Assembly
- Foundation.Data.Doublets.Cli.dll
A reversible write captured by the transactions layer. Holds both
Before and After link states so the
operation can be undone (replay After → Before) or replayed
(Before → After).
public readonly record struct Transition<TLinkAddress> : IEquatable<Transition<TLinkAddress>> where TLinkAddress : IUnsignedNumber<TLinkAddress>
Type Parameters
TLinkAddress
- Implements
-
IEquatable<Transition<TLinkAddress>>
- Inherited Members
Constructors
Transition(Guid, long, DateTimeOffset, TransitionKind, Link<TLinkAddress>, Link<TLinkAddress>)
A reversible write captured by the transactions layer. Holds both
Before and After link states so the
operation can be undone (replay After → Before) or replayed
(Before → After).
public Transition(Guid TransactionId, long Sequence, DateTimeOffset Timestamp, TransitionKind Kind, Link<TLinkAddress> Before, Link<TLinkAddress> After)
Parameters
TransactionIdGuidSequencelongTimestampDateTimeOffsetKindTransitionKindBeforeLink<TLinkAddress>AfterLink<TLinkAddress>
Properties
After
public Link<TLinkAddress> After { get; init; }
Property Value
- Link<TLinkAddress>
Before
public Link<TLinkAddress> Before { get; init; }
Property Value
- Link<TLinkAddress>
Kind
public TransitionKind Kind { get; init; }
Property Value
Sequence
public long Sequence { get; init; }
Property Value
Timestamp
public DateTimeOffset Timestamp { get; init; }
Property Value
TransactionId
public Guid TransactionId { get; init; }
Property Value
Methods
Serialize()
Encodes the transition as a single line stored as the name of one link in the log doublets store.
public string Serialize()
Returns
TryParse(string, out Transition<TLinkAddress>)
public static bool TryParse(string text, out Transition<TLinkAddress> transition)
Parameters
textstringtransitionTransition<TLinkAddress>