ReplaceObjectAction

Action
[IoId("00000000-56e1-4b3c-9f6a-8c07d24a91b5")] [UiName("Replace Object")] public sealed class ReplaceObjectAction : Action
An undo action for swapping one document object for another which shares its instance ids. This is what placeholder resurrection records; because the ids are identical on both sides, the wires of surviving neighbours remain valid across undo and redo without any disconnection bookkeeping.

Constructors

ReplaceObjectAction

#
Create a replacement record. Note that this action does not perform the initial swap, it only stores the data needed to undo and redo it.
public ReplaceObjectAction(
removed,
Object which is removed from the document.
added
Object which takes its place.
)

ReplaceObjectAction

#
public ReplaceObjectAction(
reader
)

Properties

InstanceId

#
public Guid InstanceId { get; }

Response

Gets the automatic response required by this action.
public Effects Response { get; }
inherited fromAction

State

Gets the state this action is in.
public State State { get; }
inherited fromAction

Methods

Extends

Override this method to indicate this action extends another action, and can thus be dropped from a sequence of actions.
public virtual bool Extends(
action
)
inherited fromAction

PerformRedo

Redo this action. This is only allowed if the Action.State equals State.Redo.
public bool PerformRedo()
inherited fromAction

PerformRedoInternal

#
protected override void PerformRedoInternal()

PerformUndo

Undo this action. This is only allowed if the Action.State equals State.Undo.
public bool PerformUndo()
inherited fromAction

PerformUndoInternal

#
protected override void PerformUndoInternal()

PrepareRedo

Run the preperatory work for a redo operation. The Action.PerformRedo(Document) method ought never be called without a preceding call to Action.PrepareRedo(Document), although note that a call to Action.PrepareRedo(Document) is not necessarily followed by a call to Action.PerformRedo(Document).
public bool PrepareRedo()
inherited fromAction

PrepareRedoInternal

protected virtual void PrepareRedoInternal()
inherited fromAction

PrepareUndo

Run the preperatory work for an undo operation. The Action.PerformUndo(Document) method ought never be called without a preceding call to Action.PrepareUndo(Document), although note that a call to Action.PrepareUndo(Document) is not necessarily followed by a call to Action.PerformUndo(Document).
public bool PrepareUndo()
inherited fromAction

PrepareUndoInternal

protected virtual void PrepareUndoInternal()
inherited fromAction

Store

#
public override void Store(
writer
)
Action.Store