Пример #1
0
        public override int Execute()
        {
            ToolAppliedOption.EnsureNoConflictGlobalLocalToolPathOption(
                _options,
                LocalizableStrings.UninstallToolCommandInvalidGlobalAndLocalAndToolPath);

            ToolAppliedOption.EnsureToolManifestAndOnlyLocalFlagCombination(_options);

            if (_global || !string.IsNullOrWhiteSpace(_toolPath))
            {
                return(_toolUninstallGlobalOrToolPathCommand.Execute());
            }
            else
            {
                return(_toolUninstallLocalCommand.Execute());
            }
        }
Пример #2
0
        public override int Execute()
        {
            EnsureNoConflictGlobalLocalToolPathOption();

            if (_global || !string.IsNullOrWhiteSpace(_toolPath))
            {
                if (!string.IsNullOrWhiteSpace(_toolManifestOption))
                {
                    throw new GracefulException(
                              string.Format(
                                  LocalizableStrings.OnlyLocalOptionSupportManifestFileOption));
                }

                return(_toolUninstallGlobalOrToolPathCommand.Execute());
            }
            else
            {
                return(_toolUninstallLocalCommand.Execute());
            }
        }