NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

IUndoService.AddAction (IActionUnit, Boolean, Boolean)

Adds an action unit to the undo stack.

[Visual Basic]
Overloads Sub AddAction( _
   ByVal action As IActionUnit, _
   ByVal needsExecute As Boolean, _
   ByVal supressChildUndoAdds As Boolean _
)
[C#]
void AddAction(
   IActionUnit action,
   bool needsExecute,
   bool supressChildUndoAdds
);
[C++]
void AddAction(
   IActionUnit* action,
   bool needsExecute,
   bool supressChildUndoAdds
) = 0;
[JScript]
function AddAction(
   action : IActionUnit,
   needsExecute : Boolean,
   supressChildUndoAdds : Boolean
);

Parameters

action
The action to perform and add to the undo stack.
needsExecute
true for the undo service to call DoAction on action when it is added.
supressChildUndoAdds
true to prevent this action from adding more undo actions when it is executed.

Remarks

If this action is ever undone, it will be added automatically to the redo stack, if appropriate. If needsExecute is true, it will be executed, so actions may be created before they are to be executed. If the action has already been performed, set needsExcecute to false and create the action in the "UNDO" state. suppressChildUndoAdds specified as true will cause the undo service to ignore any undo actions that action attempts to add when it is executed. If needsExecute is false, this parameter is ignored.

See Also

IUndoService Interface | IUndoService Members | System.ComponentModel.Design Namespace | IUndoService.AddAction Overload List