Add() public method

public Add ( IMvxCommand command, string name, string canExecuteName ) : void
command IMvxCommand
name string
canExecuteName string
return void
        protected virtual void CreateCommand(object owner, MvxCommandCollection collection, MethodInfo commandMethod,
                                             string commandName, bool hasParameter)
        {
            var canExecuteProperty = this.CanExecutePropertyInfo(owner.GetType(), commandMethod);

            var helper = hasParameter
                             ? (IMvxCommandBuilder)
                               new MvxParameterizedCommandBuilder(commandMethod, canExecuteProperty)
                             : new MvxCommandBuilder(commandMethod, canExecuteProperty);

            var command = helper.ToCommand(owner);
            collection.Add(command, commandName, helper.CanExecutePropertyName);
        }
        protected virtual void CreateCommand(object owner, MvxCommandCollection collection, MethodInfo commandMethod,
                                             string commandName, bool hasParameter)
        {
            var canExecuteProperty = CanExecutePropertyInfo(owner.GetType(), commandMethod);

            var helper = hasParameter
                             ? (IMvxCommandBuilder)
                         new MvxParameterizedCommandBuilder(commandMethod, canExecuteProperty)
                             : new MvxCommandBuilder(commandMethod, canExecuteProperty);

            var command = helper.ToCommand(owner);

            collection.Add(command, commandName, helper.CanExecutePropertyName);
        }