Table of Contents

Struct Transition

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 : IEquatable<Transition>
Implements
Inherited Members

Constructors

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<uint> Before, Link<uint> After)

Parameters

TransactionId Guid
Sequence long
Timestamp DateTimeOffset
Kind TransitionKind
Before Link<uint>
After Link<uint>

Properties

After

public Link<uint> After { get; init; }

Property Value

Link<uint>

Before

public Link<uint> Before { get; init; }

Property Value

Link<uint>

Kind

public TransitionKind Kind { get; init; }

Property Value

TransitionKind

Sequence

public long Sequence { get; init; }

Property Value

long

Timestamp

public DateTimeOffset Timestamp { get; init; }

Property Value

DateTimeOffset

TransactionId

public Guid TransactionId { get; init; }

Property Value

Guid

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

string

TryParse(string, out Transition)

public static bool TryParse(string text, out Transition transition)

Parameters

text string
transition Transition

Returns

bool