csharp
public sealed class CompositeCommandSeveral commands that undo and redo as one.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Undone in reverse, which is not a stylistic choice: the later commands may depend on what the earlier ones did — "create the entity" then "parent it" — and unwinding them in the order they ran would try to unparent something that no longer exists.
Fields and properties (2)
public string NameWhat this is called in the undo history, as a person would say it.
public IReadOnlyList<IEditorCommand> CommandsWhat this is made of, in the order it runs.
Methods (3)
public CompositeCommand(string name, params IEditorCommand[] commands)Groups commands into one entry.
public void Do(EditorContext context)Applies the change.
public void Undo(EditorContext context)Puts back exactly what Do changed.
Used by (1)
- CommandStackVixen.Editor.Core