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)

Adds an action unit to the undo stack.

[Visual Basic]
Overloads Sub AddAction( _
   ByVal action As IActionUnit, _
   ByVal needsExecute As Boolean _
)
[C#]
void AddAction(
   IActionUnit action,
   bool needsExecute
);
[C++]
void AddAction(
   IActionUnit* action,
   bool needsExecute
) = 0;
[JScript]
function AddAction(
   action : IActionUnit,
   needsExecute : 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.

Remarks

If this action is undone, it will be added 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.

See Also

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