Пример #1
0
        public UIGenericCommand(Action <T> commandAction, Func <T, bool> canExecute = null)
        {
            if (commandAction == null)
            {
                throw new ArgumentNullException(nameof(commandAction));
            }

            m_CommandAction = new WeakAction <T> (commandAction);

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