EditingSystem

.NET エディターのためのアンドゥ/リドゥ

生成プロパティ、連続操作、トランザクション、監視可能コレクションを扱う、NativeAOT フレンドリーな .NET 向けアンドゥ/リドゥ。

はじめる デモを試す NuGet GitHub

dotnet add package Jewelry.EditingSystem

生成プロパティ

[Undoable] パーシャルプロパティは、通常編集、アンドゥ、リドゥを同じ生成済みセッター経路で処理します。

連続編集

CoalescingBatch() はスライダー、ドラッグ、カラーピッカーを一つの意味のあるアンドゥ操作にまとめます。

安全な一括編集

Transaction() は追跡済みの編集をまとめて確定または復元し、Batch() は変更を残したまままとめます。

コレクションと MVVM

監視可能コレクションの変更を追跡し、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

English version