Class UndoCommand
Base class for undoable commands.
Inherited Members
Namespace: Unity.AppUI.Undo
Assembly: Unity.AppUI.Undo.dll
Syntax
public abstract class UndoCommand
Constructors
UndoCommand(string)
Creates a new undo command.
Declaration
protected UndoCommand(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the command. |
Properties
id
The unique identifier of the command type.
Declaration
public abstract string id { get; }
Property Value
Type | Description |
---|---|
string |
isObsolete
Whether the command is obsolete.
Declaration
public bool isObsolete { get; set; }
Property Value
Type | Description |
---|---|
bool |
memorySize
The memory size of the command.
Declaration
public abstract ulong memorySize { get; }
Property Value
Type | Description |
---|---|
ulong |
name
The name of the command.
Declaration
public string name { get; }
Property Value
Type | Description |
---|---|
string |
Methods
MergeWith(UndoCommand)
Merges the command with another command.
Declaration
public virtual bool MergeWith(UndoCommand command)
Parameters
Type | Name | Description |
---|---|---|
Undo |
command | The command to merge with. |
Returns
Type | Description |
---|---|
bool | Whether the command was merged. |
OnFlush()
Called when the command is flushed.
Declaration
public abstract void OnFlush()
Redo()
Redoes the command.
Declaration
public abstract void Redo()
Undo()
Undoes the command.
Declaration
public abstract void Undo()