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

#
public ReplaceObjectAction(IDocumentObject removed, IDocumentObject added)
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.
removed (IDocumentObject)Object which is removed from the document.
added (IDocumentObject)Object which takes its place.

ReplaceObjectAction

#
public ReplaceObjectAction(IReader reader)
reader (IReader)

Properties

InstanceId

#
public Guid InstanceId { get; }

Response

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

State

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

Methods

Extends

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

PerformRedo

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

PerformRedoInternal

#
protected override void PerformRedoInternal(Document doc)
doc (Document)

PerformUndo

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

PerformUndoInternal

#
protected override void PerformUndoInternal(Document doc)
doc (Document)

PrepareRedo

public bool PrepareRedo(Document doc)
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).
inherited fromAction
doc (Document)

PrepareRedoInternal

protected virtual void PrepareRedoInternal(Document doc)
inherited fromAction
doc (Document)

PrepareUndo

public bool PrepareUndo(Document doc)
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).
inherited fromAction
doc (Document)

PrepareUndoInternal

protected virtual void PrepareUndoInternal(Document doc)
inherited fromAction
doc (Document)

Store

#
public override void Store(IWriter writer)
writer (IWriter)
Action.Store