Description
The OnRedo
field is an event handler that is triggered whenever a redo operation is executed within the UndoSystem
. It is a public instance field of type System.Action<Sandbox.Helpers.UndoSystem.Entry>
, allowing you to attach custom actions that should be performed when a redo occurs.
Usage
To use the OnRedo
field, you can assign a delegate or lambda expression that matches the signature of System.Action<Sandbox.Helpers.UndoSystem.Entry>
. This delegate will be called with the Entry
object that represents the redo action being executed.
Example usage:
UndoSystem undoSystem = new UndoSystem();
undoSystem.OnRedo += (entry) => {
// Custom logic to execute on redo
Console.WriteLine($"Redo action: {entry.Title}");
};
Example
UndoSystem undoSystem = new UndoSystem();
undoSystem.OnRedo += (entry) => {
// Custom logic to execute on redo
Console.WriteLine($"Redo action: {entry.Title}");
};