Vixen
feb85697
csharp
public sealed class RecordedValuesCommand

A change somebody already applied, as one undo entry: each object's before and after.

Read the guide page for this →

Remarks

What CreateRecordCommand returns by default (doc 50 § P5, #1291). SetValuesCommand is one value written to N objects and reads what they held when it is built; this is N values, both halves handed over, because the surface that applied the change is the only thing that still knows what was there before.

⚠ One entry for N objects, never N entries. Recording a three-object drag as three per-object commands under a composite would be the shape doc 36 refused — and a per-frame command per mouse-move, coalesced afterwards, is the other shape it refused.

⚠ Never merges. A recorded change is a finished one; folding it into the edit before it would undo two drags at once.

Fields and properties (1)

  • public string Name

    What this is called in the undo history, as a person would say it.

Methods (4)

  • public RecordedValuesCommand(IEditMember member, IReadOnlyList<object> targets, IReadOnlyList<object?> before, IReadOnlyList<object?> after, string name, EditorDocument? document = null)

    Records a change already applied.

  • public void Do(EditorContext context)
  • public void Undo(EditorContext context)

    Puts back exactly what Do changed.

  • public bool TryMergeWith(IEditorCommand previous, out IEditorCommand? merged)

    Absorbs the entry below this one, so that the two become one undo step.

Used by (2)

  • EditRecordTestsVixen.Editor.Core.Tests
  • IEditMemberVixen.Editor.Core