public RegisterAction ( System.Action action ) : void | ||
action | System.Action | The action. |
return | void |
public void RegisterAction(Action action)
{
Argument.IsNotNull("action", action);
lock (_lock)
{
_actions.Add(action);
Log.Debug("Registered action in CompositeCommand");
}
}
CompositeCommand::RegisterAction ( Action |
public void RegistersActionForExecution() { var compositeCommand = new CompositeCommand(); bool executed = false; var action = new Action<object>(obj => executed = true); compositeCommand.RegisterAction(action); compositeCommand.Execute(); Assert.IsTrue(executed); }