Ejemplo n.º 1
0
        public UICommand(Action commandAction, Func <bool> canExecute = null)
        {
            if (commandAction == null)
            {
                throw new ArgumentNullException(nameof(commandAction));
            }

            m_CommandAction = new WeakAction(commandAction);

            if (canExecute != null)
            {
                m_CanExecute = new WeakFunc <bool> (canExecute);
            }
        }