22 行
517 B
C#
22 行
517 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace UndoTree;
|
|
|
|
internal enum StepKind
|
|
{
|
|
Set,
|
|
Replace,
|
|
Collection,
|
|
Call,
|
|
}
|
|
|
|
internal sealed record UndoTreeHop(string Property, int Index)
|
|
{
|
|
[JsonIgnore]
|
|
public bool IsRoot => Property.Length == 0;
|
|
|
|
public static UndoTreeHop Root(int index) => new(string.Empty, index);
|
|
}
|
|
|
|
internal sealed record UndoTreeStep(string Kind, IReadOnlyList<UndoTreeHop> Target, string Member, string Before = "", string After = "", UndoTreeListChange? List = null);
|