Ejemplo n.º 1
0
        public override int Execute()
        {
            EnsureNoConflictGlobalLocalToolPathOption();

            if (_global || !string.IsNullOrWhiteSpace(_toolPath))
            {
                return(_toolListGlobalOrToolPathCommand.Execute());
            }
            else
            {
                return(_toolListLocalCommand.Execute());
            }
        }
Ejemplo n.º 2
0
        public override int Execute()
        {
            ToolAppliedOption.EnsureNoConflictGlobalLocalToolPathOption(
                _parseResult,
                LocalizableStrings.ListToolCommandInvalidGlobalAndLocalAndToolPath);

            if (_parseResult.ValueForOption <bool>(ToolListCommandParser.GlobalOption) ||
                _parseResult.HasOption(ToolListCommandParser.ToolPathOption))
            {
                return(_toolListGlobalOrToolPathCommand.Execute());
            }
            else
            {
                return(_toolListLocalCommand.Execute());
            }
        }
Ejemplo n.º 3
0
        public override int Execute()
        {
            ToolAppliedOption.EnsureNoConflictGlobalLocalToolPathOption(
                _options,
                LocalizableStrings.ListToolCommandInvalidGlobalAndLocalAndToolPath);

            if (_options.ValueOrDefault <bool>(ToolAppliedOption.GlobalOption) ||
                !string.IsNullOrWhiteSpace(_options.SingleArgumentOrDefault(ToolAppliedOption.ToolPathOption)))
            {
                return(_toolListGlobalOrToolPathCommand.Execute());
            }
            else
            {
                return(_toolListLocalCommand.Execute());
            }
        }