Catel.MVVM.CompositeCommand.RegisterAction C# (CSharp) Method

RegisterAction() public method

Registers the specified action.
The is null.
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");
            }
        }

Same methods

CompositeCommand::RegisterAction ( Action action ) : void

Usage Example

Esempio n. 1
0
            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);
            }
All Usage Examples Of Catel.MVVM.CompositeCommand::RegisterAction