生成プロパティ、連続操作、トランザクション、監視可能コレクションを扱う、NativeAOT フレンドリーな .NET 向けアンドゥ/リドゥ。
dotnet add package Jewelry.EditingSystem
[Undoable] パーシャルプロパティは、通常編集、アンドゥ、リドゥを同じ生成済みセッター経路で処理します。
CoalescingBatch() はスライダー、ドラッグ、カラーピッカーを一つの意味のあるアンドゥ操作にまとめます。
Transaction() は追跡済みの編集をまとめて確定または復元し、Batch() は変更を残したまままとめます。
監視可能コレクションの変更を追跡し、CommunityToolkit.Mvvm の通知、検証、コマンド、メッセージングを維持します。
using Jewelry.EditingSystem;
using Jewelry.EditingSystem.Annotations;
[EditingHistory(nameof(history))]
public sealed partial class Document(History history)
{
[Undoable]
public partial double X { get; set; }
}
using var history = new History();
var document = new Document(history);
document.X = 100;
history.Undo(); // X == 0