Description
The OnRedo
field is an event handler that is triggered whenever a redo operation is executed within the UndoSystem
. This field is of type System.Action<UndoSystem.Entry>
, allowing you to attach custom actions that should occur when a redo is performed.
Usage
To use the OnRedo
field, you can subscribe to it by adding a method that matches the System.Action<UndoSystem.Entry>
delegate signature. This method will be called with the UndoSystem.Entry
that is being redone.
Example usage:
UndoSystem undoSystem = new UndoSystem();
undoSystem.OnRedo += entry => {
// Custom logic to execute when a redo is performed
Console.WriteLine($"Redoing: {entry.Title}");
};
Example
UndoSystem undoSystem = new UndoSystem();
undoSystem.OnRedo += entry => {
// Custom logic to execute when a redo is performed
Console.WriteLine($"Redoing: {entry.Title}");
};