From 962ba8f6a95d00c07ec2a292425f0c3b8484612f Mon Sep 17 00:00:00 2001 From: AmirMS <104940545+AmelBawa-msft@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:53:13 -0800 Subject: [PATCH 1/3] Updated HelpLink --- src/AppInstallerCLICore/Command.h | 2 +- .../Commands/CompleteCommand.cpp | 4 +-- .../Commands/CompleteCommand.h | 2 +- .../Commands/ExperimentalCommand.cpp | 4 +-- .../Commands/ExperimentalCommand.h | 2 +- .../Commands/ExportCommand.cpp | 4 +-- .../Commands/ExportCommand.h | 2 +- .../Commands/FeaturesCommand.cpp | 4 +-- .../Commands/FeaturesCommand.h | 2 +- .../Commands/HashCommand.cpp | 4 +-- .../Commands/HashCommand.h | 2 +- .../Commands/ImportCommand.cpp | 4 +-- .../Commands/ImportCommand.h | 2 +- .../Commands/InstallCommand.cpp | 4 +-- .../Commands/InstallCommand.h | 2 +- .../Commands/ListCommand.cpp | 4 +-- .../Commands/ListCommand.h | 2 +- .../Commands/PinCommand.cpp | 22 +++++++------- src/AppInstallerCLICore/Commands/PinCommand.h | 10 +++---- .../Commands/RootCommand.cpp | 4 +-- .../Commands/RootCommand.h | 2 +- .../Commands/SearchCommand.cpp | 4 +-- .../Commands/SearchCommand.h | 2 +- .../Commands/SettingsCommand.cpp | 10 +++---- .../Commands/SettingsCommand.h | 4 +-- .../Commands/ShowCommand.cpp | 4 +-- .../Commands/ShowCommand.h | 2 +- .../Commands/SourceCommand.cpp | 30 +++++++++---------- .../Commands/SourceCommand.h | 14 ++++----- .../Commands/UninstallCommand.cpp | 4 +-- .../Commands/UninstallCommand.h | 2 +- .../Commands/UpgradeCommand.cpp | 4 +-- .../Commands/UpgradeCommand.h | 2 +- .../Commands/ValidateCommand.cpp | 4 +-- .../Commands/ValidateCommand.h | 2 +- 35 files changed, 88 insertions(+), 88 deletions(-) diff --git a/src/AppInstallerCLICore/Command.h b/src/AppInstallerCLICore/Command.h index 0c2b92c391..bb3d99f2e8 100644 --- a/src/AppInstallerCLICore/Command.h +++ b/src/AppInstallerCLICore/Command.h @@ -101,7 +101,7 @@ namespace AppInstaller::CLI virtual void OutputIntroHeader(Execution::Reporter& reporter) const; virtual void OutputHelp(Execution::Reporter& reporter, const CommandException* exception = nullptr) const; - virtual std::string HelpLink() const { return {}; } + virtual Utility::LocIndString HelpLink() const { return {}; } virtual std::unique_ptr FindSubCommand(Invocation& inv) const; virtual void ParseArguments(Invocation& inv, Execution::Args& execArgs) const; diff --git a/src/AppInstallerCLICore/Commands/CompleteCommand.cpp b/src/AppInstallerCLICore/Commands/CompleteCommand.cpp index 7c6a22d7e3..5369664895 100644 --- a/src/AppInstallerCLICore/Commands/CompleteCommand.cpp +++ b/src/AppInstallerCLICore/Commands/CompleteCommand.cpp @@ -29,9 +29,9 @@ namespace AppInstaller::CLI return { Resource::String::CompleteCommandLongDescription }; } - std::string CompleteCommand::HelpLink() const + Utility::LocIndString CompleteCommand::HelpLink() const { - return "https://aka.ms/winget-command-complete"; + return "https://aka.ms/winget-command-complete"_lis; } void CompleteCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/CompleteCommand.h b/src/AppInstallerCLICore/Commands/CompleteCommand.h index 8734cfb432..078c11bd05 100644 --- a/src/AppInstallerCLICore/Commands/CompleteCommand.h +++ b/src/AppInstallerCLICore/Commands/CompleteCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/ExperimentalCommand.cpp b/src/AppInstallerCLICore/Commands/ExperimentalCommand.cpp index ebafad51c0..ba31a4e8ab 100644 --- a/src/AppInstallerCLICore/Commands/ExperimentalCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ExperimentalCommand.cpp @@ -29,9 +29,9 @@ namespace AppInstaller::CLI return { Resource::String::ExperimentalCommandLongDescription }; } - std::string ExperimentalCommand::HelpLink() const + Utility::LocIndString ExperimentalCommand::HelpLink() const { - return "https://aka.ms/winget-settings"; + return "https://aka.ms/winget-settings"_lis; } void ExperimentalCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ExperimentalCommand.h b/src/AppInstallerCLICore/Commands/ExperimentalCommand.h index cbcd62373a..cc4dd10d23 100644 --- a/src/AppInstallerCLICore/Commands/ExperimentalCommand.h +++ b/src/AppInstallerCLICore/Commands/ExperimentalCommand.h @@ -17,7 +17,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/ExportCommand.cpp b/src/AppInstallerCLICore/Commands/ExportCommand.cpp index e963bddca8..f3b17eed79 100644 --- a/src/AppInstallerCLICore/Commands/ExportCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ExportCommand.cpp @@ -46,9 +46,9 @@ namespace AppInstaller::CLI } } - std::string ExportCommand::HelpLink() const + Utility::LocIndString ExportCommand::HelpLink() const { - return "https://aka.ms/winget-command-export"; + return "https://aka.ms/winget-command-export"_lis; } void ExportCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ExportCommand.h b/src/AppInstallerCLICore/Commands/ExportCommand.h index 25e5c985f3..9863ec0f6e 100644 --- a/src/AppInstallerCLICore/Commands/ExportCommand.h +++ b/src/AppInstallerCLICore/Commands/ExportCommand.h @@ -17,7 +17,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/FeaturesCommand.cpp b/src/AppInstallerCLICore/Commands/FeaturesCommand.cpp index a9484ca5bc..73034c3ea7 100644 --- a/src/AppInstallerCLICore/Commands/FeaturesCommand.cpp +++ b/src/AppInstallerCLICore/Commands/FeaturesCommand.cpp @@ -20,9 +20,9 @@ namespace AppInstaller::CLI return { Resource::String::FeaturesCommandLongDescription }; } - std::string FeaturesCommand::HelpLink() const + Utility::LocIndString FeaturesCommand::HelpLink() const { - return "https://aka.ms/winget-experimentalfeatures"; + return "https://aka.ms/winget-experimentalfeatures"_lis; } void FeaturesCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/FeaturesCommand.h b/src/AppInstallerCLICore/Commands/FeaturesCommand.h index 879e349193..91e7d0ec1b 100644 --- a/src/AppInstallerCLICore/Commands/FeaturesCommand.h +++ b/src/AppInstallerCLICore/Commands/FeaturesCommand.h @@ -15,7 +15,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/HashCommand.cpp b/src/AppInstallerCLICore/Commands/HashCommand.cpp index 6d6c18ce9d..a30e7457fb 100644 --- a/src/AppInstallerCLICore/Commands/HashCommand.cpp +++ b/src/AppInstallerCLICore/Commands/HashCommand.cpp @@ -30,9 +30,9 @@ namespace AppInstaller::CLI return { Resource::String::HashCommandLongDescription }; } - std::string HashCommand::HelpLink() const + Utility::LocIndString HashCommand::HelpLink() const { - return "https://aka.ms/winget-command-hash"; + return "https://aka.ms/winget-command-hash"_lis; } void HashCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/HashCommand.h b/src/AppInstallerCLICore/Commands/HashCommand.h index 3b395ff9e9..6f5f98b37f 100644 --- a/src/AppInstallerCLICore/Commands/HashCommand.h +++ b/src/AppInstallerCLICore/Commands/HashCommand.h @@ -14,7 +14,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/ImportCommand.cpp b/src/AppInstallerCLICore/Commands/ImportCommand.cpp index 924554ecb7..2113bab0b1 100644 --- a/src/AppInstallerCLICore/Commands/ImportCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ImportCommand.cpp @@ -33,9 +33,9 @@ namespace AppInstaller::CLI return { Resource::String::ImportCommandLongDescription }; } - std::string ImportCommand::HelpLink() const + Utility::LocIndString ImportCommand::HelpLink() const { - return "https://aka.ms/winget-command-import"; + return "https://aka.ms/winget-command-import"_lis; } void ImportCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ImportCommand.h b/src/AppInstallerCLICore/Commands/ImportCommand.h index 1ab89efea5..90c532a0d5 100644 --- a/src/AppInstallerCLICore/Commands/ImportCommand.h +++ b/src/AppInstallerCLICore/Commands/ImportCommand.h @@ -15,7 +15,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/InstallCommand.cpp b/src/AppInstallerCLICore/Commands/InstallCommand.cpp index c7bfcf0a6f..d80f6f9e91 100644 --- a/src/AppInstallerCLICore/Commands/InstallCommand.cpp +++ b/src/AppInstallerCLICore/Commands/InstallCommand.cpp @@ -86,9 +86,9 @@ namespace AppInstaller::CLI } } - std::string InstallCommand::HelpLink() const + Utility::LocIndString InstallCommand::HelpLink() const { - return "https://aka.ms/winget-command-install"; + return "https://aka.ms/winget-command-install"_lis; } void InstallCommand::ValidateArgumentsInternal(Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/InstallCommand.h b/src/AppInstallerCLICore/Commands/InstallCommand.h index cb78ca538c..5dc7337062 100644 --- a/src/AppInstallerCLICore/Commands/InstallCommand.h +++ b/src/AppInstallerCLICore/Commands/InstallCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/ListCommand.cpp b/src/AppInstallerCLICore/Commands/ListCommand.cpp index 3828aa44e9..f37e031acb 100644 --- a/src/AppInstallerCLICore/Commands/ListCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ListCommand.cpp @@ -64,9 +64,9 @@ namespace AppInstaller::CLI } } - std::string ListCommand::HelpLink() const + Utility::LocIndString ListCommand::HelpLink() const { - return "https://aka.ms/winget-command-list"; + return "https://aka.ms/winget-command-list"_lis; } void ListCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ListCommand.h b/src/AppInstallerCLICore/Commands/ListCommand.h index a760b959d0..985d3abf07 100644 --- a/src/AppInstallerCLICore/Commands/ListCommand.h +++ b/src/AppInstallerCLICore/Commands/ListCommand.h @@ -17,7 +17,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/PinCommand.cpp b/src/AppInstallerCLICore/Commands/PinCommand.cpp index 5cdedb26b0..981a3f3213 100644 --- a/src/AppInstallerCLICore/Commands/PinCommand.cpp +++ b/src/AppInstallerCLICore/Commands/PinCommand.cpp @@ -13,7 +13,7 @@ namespace AppInstaller::CLI using namespace AppInstaller::Utility::literals; using namespace std::string_view_literals; - static constexpr std::string_view s_PinCommand_HelpLink = "https://aka.ms/winget-command-pin"sv; + Utility::LocIndString s_PinCommand_HelpLink = "https://aka.ms/winget-command-pin"_lis; std::vector> PinCommand::GetCommands() const { @@ -35,9 +35,9 @@ namespace AppInstaller::CLI return { Resource::String::PinCommandLongDescription }; } - std::string PinCommand::HelpLink() const + Utility::LocIndString PinCommand::HelpLink() const { - return std::string{ s_PinCommand_HelpLink }; + return s_PinCommand_HelpLink; } void PinCommand::ExecuteInternal(Execution::Context& context) const @@ -89,9 +89,9 @@ namespace AppInstaller::CLI } } - std::string PinAddCommand::HelpLink() const + Utility::LocIndString PinAddCommand::HelpLink() const { - return std::string{ s_PinCommand_HelpLink }; + return s_PinCommand_HelpLink; } void PinAddCommand::ValidateArgumentsInternal(Execution::Args& execArgs) const @@ -150,9 +150,9 @@ namespace AppInstaller::CLI } } - std::string PinRemoveCommand::HelpLink() const + Utility::LocIndString PinRemoveCommand::HelpLink() const { - return std::string{ s_PinCommand_HelpLink }; + return s_PinCommand_HelpLink; } void PinRemoveCommand::ExecuteInternal(Execution::Context& context) const @@ -202,9 +202,9 @@ namespace AppInstaller::CLI } } - std::string PinListCommand::HelpLink() const + Utility::LocIndString PinListCommand::HelpLink() const { - return std::string{ s_PinCommand_HelpLink }; + return s_PinCommand_HelpLink; } void PinListCommand::ExecuteInternal(Execution::Context& context) const @@ -230,9 +230,9 @@ namespace AppInstaller::CLI return { Resource::String::PinResetCommandLongDescription }; } - std::string PinResetCommand::HelpLink() const + Utility::LocIndString PinResetCommand::HelpLink() const { - return std::string{ s_PinCommand_HelpLink }; + return s_PinCommand_HelpLink; } void PinResetCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/PinCommand.h b/src/AppInstallerCLICore/Commands/PinCommand.h index 8740971b9d..6c115da450 100644 --- a/src/AppInstallerCLICore/Commands/PinCommand.h +++ b/src/AppInstallerCLICore/Commands/PinCommand.h @@ -15,7 +15,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -32,7 +32,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; @@ -50,7 +50,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -67,7 +67,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -82,7 +82,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/RootCommand.cpp b/src/AppInstallerCLICore/Commands/RootCommand.cpp index 4e1bb003fe..907efe8950 100644 --- a/src/AppInstallerCLICore/Commands/RootCommand.cpp +++ b/src/AppInstallerCLICore/Commands/RootCommand.cpp @@ -148,9 +148,9 @@ namespace AppInstaller::CLI return { Resource::String::ToolDescription }; } - std::string RootCommand::HelpLink() const + Utility::LocIndString RootCommand::HelpLink() const { - return "https://aka.ms/winget-command-help"; + return "https://aka.ms/winget-command-help"_lis; } void RootCommand::Execute(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/RootCommand.h b/src/AppInstallerCLICore/Commands/RootCommand.h index 87d051eee6..7a68902110 100644 --- a/src/AppInstallerCLICore/Commands/RootCommand.h +++ b/src/AppInstallerCLICore/Commands/RootCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; void Execute(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/SearchCommand.cpp b/src/AppInstallerCLICore/Commands/SearchCommand.cpp index b027d7d2de..2f08e0a07e 100644 --- a/src/AppInstallerCLICore/Commands/SearchCommand.cpp +++ b/src/AppInstallerCLICore/Commands/SearchCommand.cpp @@ -61,9 +61,9 @@ namespace AppInstaller::CLI } } - std::string SearchCommand::HelpLink() const + Utility::LocIndString SearchCommand::HelpLink() const { - return "https://aka.ms/winget-command-search"; + return "https://aka.ms/winget-command-search"_lis; } void SearchCommand::ValidateArgumentsInternal(Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/SearchCommand.h b/src/AppInstallerCLICore/Commands/SearchCommand.h index b637d9cbfd..de1d4bd5cc 100644 --- a/src/AppInstallerCLICore/Commands/SearchCommand.h +++ b/src/AppInstallerCLICore/Commands/SearchCommand.h @@ -17,7 +17,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/SettingsCommand.cpp b/src/AppInstallerCLICore/Commands/SettingsCommand.cpp index 852d437229..ee567dbc6c 100644 --- a/src/AppInstallerCLICore/Commands/SettingsCommand.cpp +++ b/src/AppInstallerCLICore/Commands/SettingsCommand.cpp @@ -16,7 +16,7 @@ namespace AppInstaller::CLI constexpr Utility::LocIndView s_ArgumentName_Enable = "enable"_liv; constexpr Utility::LocIndView s_ArgumentName_Disable = "disable"_liv; constexpr Utility::LocIndView s_ArgName_EnableAndDisable = "enable|disable"_liv; - static constexpr std::string_view s_SettingsCommand_HelpLink = "https://aka.ms/winget-settings"sv; + Utility::LocIndString s_SettingsCommand_HelpLink = "https://aka.ms/winget-settings"_lis; } std::vector> SettingsCommand::GetCommands() const @@ -44,9 +44,9 @@ namespace AppInstaller::CLI return { Resource::String::SettingsCommandLongDescription }; } - std::string SettingsCommand::HelpLink() const + Utility::LocIndString SettingsCommand::HelpLink() const { - return std::string{ s_SettingsCommand_HelpLink }; + return s_SettingsCommand_HelpLink; } void SettingsCommand::ValidateArgumentsInternal(Execution::Args& execArgs) const @@ -108,9 +108,9 @@ namespace AppInstaller::CLI return { Resource::String::SettingsExportCommandLongDescription }; } - std::string SettingsExportCommand::HelpLink() const + Utility::LocIndString SettingsExportCommand::HelpLink() const { - return std::string{ s_SettingsCommand_HelpLink }; + return s_SettingsCommand_HelpLink; } void SettingsExportCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/SettingsCommand.h b/src/AppInstallerCLICore/Commands/SettingsCommand.h index 1eb7c9af08..4d1b71ffb0 100644 --- a/src/AppInstallerCLICore/Commands/SettingsCommand.h +++ b/src/AppInstallerCLICore/Commands/SettingsCommand.h @@ -15,7 +15,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; @@ -29,7 +29,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/ShowCommand.cpp b/src/AppInstallerCLICore/Commands/ShowCommand.cpp index c2ae41d3ed..252bab065a 100644 --- a/src/AppInstallerCLICore/Commands/ShowCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ShowCommand.cpp @@ -49,9 +49,9 @@ namespace AppInstaller::CLI Workflow::CompleteWithSingleSemanticsForValue(valueType); } - std::string ShowCommand::HelpLink() const + Utility::LocIndString ShowCommand::HelpLink() const { - return "https://aka.ms/winget-command-show"; + return "https://aka.ms/winget-command-show"_lis; } void ShowCommand::ValidateArgumentsInternal(Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/ShowCommand.h b/src/AppInstallerCLICore/Commands/ShowCommand.h index b81467716d..fe82ce27f8 100644 --- a/src/AppInstallerCLICore/Commands/ShowCommand.h +++ b/src/AppInstallerCLICore/Commands/ShowCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/SourceCommand.cpp b/src/AppInstallerCLICore/Commands/SourceCommand.cpp index eef961eb81..4cd9b8cdbc 100644 --- a/src/AppInstallerCLICore/Commands/SourceCommand.cpp +++ b/src/AppInstallerCLICore/Commands/SourceCommand.cpp @@ -12,7 +12,7 @@ namespace AppInstaller::CLI using namespace AppInstaller::CLI::Execution; using namespace std::string_view_literals; - static constexpr std::string_view s_SourceCommand_HelpLink = "https://aka.ms/winget-command-source"sv; + Utility::LocIndString s_SourceCommand_HelpLink = "https://aka.ms/winget-command-source"_lis; std::vector> SourceCommand::GetCommands() const { @@ -36,9 +36,9 @@ namespace AppInstaller::CLI return { Resource::String::SourceCommandLongDescription }; } - std::string SourceCommand::HelpLink() const + Utility::LocIndString SourceCommand::HelpLink() const { - return std::string{ s_SourceCommand_HelpLink }; + return s_SourceCommand_HelpLink; } void SourceCommand::ExecuteInternal(Context& context) const @@ -67,9 +67,9 @@ namespace AppInstaller::CLI return { Resource::String::SourceAddCommandLongDescription }; } - std::string SourceAddCommand::HelpLink() const + Utility::LocIndString SourceAddCommand::HelpLink() const { - return std::string{ s_SourceCommand_HelpLink }; + return s_SourceCommand_HelpLink; } void SourceAddCommand::ExecuteInternal(Context& context) const @@ -110,9 +110,9 @@ namespace AppInstaller::CLI } } - std::string SourceListCommand::HelpLink() const + Utility::LocIndString SourceListCommand::HelpLink() const { - return std::string{ s_SourceCommand_HelpLink }; + return s_SourceCommand_HelpLink; } void SourceListCommand::ExecuteInternal(Context& context) const @@ -148,9 +148,9 @@ namespace AppInstaller::CLI } } - std::string SourceUpdateCommand::HelpLink() const + Utility::LocIndString SourceUpdateCommand::HelpLink() const { - return std::string{ s_SourceCommand_HelpLink }; + return s_SourceCommand_HelpLink; } void SourceUpdateCommand::ExecuteInternal(Context& context) const @@ -186,9 +186,9 @@ namespace AppInstaller::CLI } } - std::string SourceRemoveCommand::HelpLink() const + Utility::LocIndString SourceRemoveCommand::HelpLink() const { - return std::string{ s_SourceCommand_HelpLink }; + return s_SourceCommand_HelpLink; } void SourceRemoveCommand::ExecuteInternal(Context& context) const @@ -227,9 +227,9 @@ namespace AppInstaller::CLI } } - std::string SourceResetCommand::HelpLink() const + Utility::LocIndString SourceResetCommand::HelpLink() const { - return std::string{ s_SourceCommand_HelpLink }; + return s_SourceCommand_HelpLink; } void SourceResetCommand::ExecuteInternal(Context& context) const @@ -276,9 +276,9 @@ namespace AppInstaller::CLI } } - std::string SourceExportCommand::HelpLink() const + Utility::LocIndString SourceExportCommand::HelpLink() const { - return std::string{ s_SourceCommand_HelpLink }; + return s_SourceCommand_HelpLink; } void SourceExportCommand::ExecuteInternal(Context& context) const diff --git a/src/AppInstallerCLICore/Commands/SourceCommand.h b/src/AppInstallerCLICore/Commands/SourceCommand.h index 8004d2522e..a7b9fd6ca0 100644 --- a/src/AppInstallerCLICore/Commands/SourceCommand.h +++ b/src/AppInstallerCLICore/Commands/SourceCommand.h @@ -14,7 +14,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -29,7 +29,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -46,7 +46,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -63,7 +63,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -81,7 +81,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -98,7 +98,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -115,7 +115,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/UninstallCommand.cpp b/src/AppInstallerCLICore/Commands/UninstallCommand.cpp index dc27ed19f9..5c3f0594a6 100644 --- a/src/AppInstallerCLICore/Commands/UninstallCommand.cpp +++ b/src/AppInstallerCLICore/Commands/UninstallCommand.cpp @@ -82,9 +82,9 @@ namespace AppInstaller::CLI } } - std::string UninstallCommand::HelpLink() const + Utility::LocIndString UninstallCommand::HelpLink() const { - return "https://aka.ms/winget-command-uninstall"; + return "https://aka.ms/winget-command-uninstall"_lis; } void UninstallCommand::ValidateArgumentsInternal(Execution::Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/UninstallCommand.h b/src/AppInstallerCLICore/Commands/UninstallCommand.h index 284a0d74a0..6c950995c0 100644 --- a/src/AppInstallerCLICore/Commands/UninstallCommand.h +++ b/src/AppInstallerCLICore/Commands/UninstallCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp b/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp index 312c3ab248..aa3f828aa5 100644 --- a/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp +++ b/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp @@ -166,9 +166,9 @@ namespace AppInstaller::CLI } } - std::string UpgradeCommand::HelpLink() const + Utility::LocIndString UpgradeCommand::HelpLink() const { - return "https://aka.ms/winget-command-upgrade"; + return "https://aka.ms/winget-command-upgrade"_lis; } void UpgradeCommand::ValidateArgumentsInternal(Execution::Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/UpgradeCommand.h b/src/AppInstallerCLICore/Commands/UpgradeCommand.h index 30f63d9435..f977e19b85 100644 --- a/src/AppInstallerCLICore/Commands/UpgradeCommand.h +++ b/src/AppInstallerCLICore/Commands/UpgradeCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/ValidateCommand.cpp b/src/AppInstallerCLICore/Commands/ValidateCommand.cpp index 73f655caea..deedcc5adb 100644 --- a/src/AppInstallerCLICore/Commands/ValidateCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ValidateCommand.cpp @@ -28,9 +28,9 @@ namespace AppInstaller::CLI return Resource::LocString{ Resource::String::ValidateCommandLongDescription }; } - std::string ValidateCommand::HelpLink() const + Utility::LocIndString ValidateCommand::HelpLink() const { - return "https://aka.ms/winget-command-validate"; + return "https://aka.ms/winget-command-validate"_lis; } void ValidateCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ValidateCommand.h b/src/AppInstallerCLICore/Commands/ValidateCommand.h index 2cc9d3f9f2..9813da616f 100644 --- a/src/AppInstallerCLICore/Commands/ValidateCommand.h +++ b/src/AppInstallerCLICore/Commands/ValidateCommand.h @@ -14,7 +14,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - std::string HelpLink() const override; + Utility::LocIndString HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; From cbfd2012536c62f74a4ca5b63708bd7cc74aa744 Mon Sep 17 00:00:00 2001 From: Amir El Bawab <104940545+AmelBawa-msft@users.noreply.github.com> Date: Tue, 20 Dec 2022 09:54:50 -0800 Subject: [PATCH 2/3] Omit LocIndString --- src/AppInstallerCLICore/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AppInstallerCLICore/Command.cpp b/src/AppInstallerCLICore/Command.cpp index ddb93f2778..62ef787a66 100644 --- a/src/AppInstallerCLICore/Command.cpp +++ b/src/AppInstallerCLICore/Command.cpp @@ -246,7 +246,7 @@ namespace AppInstaller::CLI } // Finally, the link to the documentation pages - auto helpLink = Utility::LocIndString{ HelpLink() }; + auto helpLink = HelpLink(); if (!helpLink.empty()) { infoOut << std::endl << Resource::String::HelpLinkPreamble(helpLink) << std::endl; From 794985ea4623042b73d50a5d0c2c3efb9ac19e32 Mon Sep 17 00:00:00 2001 From: Amir El Bawab <104940545+AmelBawa-msft@users.noreply.github.com> Date: Tue, 20 Dec 2022 11:10:38 -0800 Subject: [PATCH 3/3] Using view instead --- src/AppInstallerCLICore/Command.h | 2 +- .../Commands/CompleteCommand.cpp | 4 ++-- .../Commands/CompleteCommand.h | 2 +- .../Commands/ExperimentalCommand.cpp | 4 ++-- .../Commands/ExperimentalCommand.h | 2 +- .../Commands/ExportCommand.cpp | 4 ++-- src/AppInstallerCLICore/Commands/ExportCommand.h | 2 +- .../Commands/FeaturesCommand.cpp | 4 ++-- .../Commands/FeaturesCommand.h | 2 +- src/AppInstallerCLICore/Commands/HashCommand.cpp | 4 ++-- src/AppInstallerCLICore/Commands/HashCommand.h | 2 +- .../Commands/ImportCommand.cpp | 4 ++-- src/AppInstallerCLICore/Commands/ImportCommand.h | 2 +- .../Commands/InstallCommand.cpp | 4 ++-- .../Commands/InstallCommand.h | 2 +- src/AppInstallerCLICore/Commands/ListCommand.cpp | 4 ++-- src/AppInstallerCLICore/Commands/ListCommand.h | 2 +- src/AppInstallerCLICore/Commands/PinCommand.cpp | 12 ++++++------ src/AppInstallerCLICore/Commands/PinCommand.h | 10 +++++----- src/AppInstallerCLICore/Commands/RootCommand.cpp | 4 ++-- src/AppInstallerCLICore/Commands/RootCommand.h | 2 +- .../Commands/SearchCommand.cpp | 4 ++-- src/AppInstallerCLICore/Commands/SearchCommand.h | 2 +- .../Commands/SettingsCommand.cpp | 6 +++--- .../Commands/SettingsCommand.h | 4 ++-- src/AppInstallerCLICore/Commands/ShowCommand.cpp | 4 ++-- src/AppInstallerCLICore/Commands/ShowCommand.h | 2 +- .../Commands/SourceCommand.cpp | 16 ++++++++-------- src/AppInstallerCLICore/Commands/SourceCommand.h | 14 +++++++------- .../Commands/UninstallCommand.cpp | 4 ++-- .../Commands/UninstallCommand.h | 2 +- .../Commands/UpgradeCommand.cpp | 4 ++-- .../Commands/UpgradeCommand.h | 2 +- .../Commands/ValidateCommand.cpp | 4 ++-- .../Commands/ValidateCommand.h | 2 +- 35 files changed, 74 insertions(+), 74 deletions(-) diff --git a/src/AppInstallerCLICore/Command.h b/src/AppInstallerCLICore/Command.h index bb3d99f2e8..c98e868450 100644 --- a/src/AppInstallerCLICore/Command.h +++ b/src/AppInstallerCLICore/Command.h @@ -101,7 +101,7 @@ namespace AppInstaller::CLI virtual void OutputIntroHeader(Execution::Reporter& reporter) const; virtual void OutputHelp(Execution::Reporter& reporter, const CommandException* exception = nullptr) const; - virtual Utility::LocIndString HelpLink() const { return {}; } + virtual Utility::LocIndView HelpLink() const { return {}; } virtual std::unique_ptr FindSubCommand(Invocation& inv) const; virtual void ParseArguments(Invocation& inv, Execution::Args& execArgs) const; diff --git a/src/AppInstallerCLICore/Commands/CompleteCommand.cpp b/src/AppInstallerCLICore/Commands/CompleteCommand.cpp index 5369664895..9ed6fb694f 100644 --- a/src/AppInstallerCLICore/Commands/CompleteCommand.cpp +++ b/src/AppInstallerCLICore/Commands/CompleteCommand.cpp @@ -29,9 +29,9 @@ namespace AppInstaller::CLI return { Resource::String::CompleteCommandLongDescription }; } - Utility::LocIndString CompleteCommand::HelpLink() const + Utility::LocIndView CompleteCommand::HelpLink() const { - return "https://aka.ms/winget-command-complete"_lis; + return "https://aka.ms/winget-command-complete"_liv; } void CompleteCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/CompleteCommand.h b/src/AppInstallerCLICore/Commands/CompleteCommand.h index 078c11bd05..f766f4ef4f 100644 --- a/src/AppInstallerCLICore/Commands/CompleteCommand.h +++ b/src/AppInstallerCLICore/Commands/CompleteCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/ExperimentalCommand.cpp b/src/AppInstallerCLICore/Commands/ExperimentalCommand.cpp index ba31a4e8ab..3defb2c5d7 100644 --- a/src/AppInstallerCLICore/Commands/ExperimentalCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ExperimentalCommand.cpp @@ -29,9 +29,9 @@ namespace AppInstaller::CLI return { Resource::String::ExperimentalCommandLongDescription }; } - Utility::LocIndString ExperimentalCommand::HelpLink() const + Utility::LocIndView ExperimentalCommand::HelpLink() const { - return "https://aka.ms/winget-settings"_lis; + return "https://aka.ms/winget-settings"_liv; } void ExperimentalCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ExperimentalCommand.h b/src/AppInstallerCLICore/Commands/ExperimentalCommand.h index cc4dd10d23..71dc340c48 100644 --- a/src/AppInstallerCLICore/Commands/ExperimentalCommand.h +++ b/src/AppInstallerCLICore/Commands/ExperimentalCommand.h @@ -17,7 +17,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/ExportCommand.cpp b/src/AppInstallerCLICore/Commands/ExportCommand.cpp index f3b17eed79..bcb33d1738 100644 --- a/src/AppInstallerCLICore/Commands/ExportCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ExportCommand.cpp @@ -46,9 +46,9 @@ namespace AppInstaller::CLI } } - Utility::LocIndString ExportCommand::HelpLink() const + Utility::LocIndView ExportCommand::HelpLink() const { - return "https://aka.ms/winget-command-export"_lis; + return "https://aka.ms/winget-command-export"_liv; } void ExportCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ExportCommand.h b/src/AppInstallerCLICore/Commands/ExportCommand.h index 9863ec0f6e..87fd943a34 100644 --- a/src/AppInstallerCLICore/Commands/ExportCommand.h +++ b/src/AppInstallerCLICore/Commands/ExportCommand.h @@ -17,7 +17,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/FeaturesCommand.cpp b/src/AppInstallerCLICore/Commands/FeaturesCommand.cpp index 73034c3ea7..8e474ed36c 100644 --- a/src/AppInstallerCLICore/Commands/FeaturesCommand.cpp +++ b/src/AppInstallerCLICore/Commands/FeaturesCommand.cpp @@ -20,9 +20,9 @@ namespace AppInstaller::CLI return { Resource::String::FeaturesCommandLongDescription }; } - Utility::LocIndString FeaturesCommand::HelpLink() const + Utility::LocIndView FeaturesCommand::HelpLink() const { - return "https://aka.ms/winget-experimentalfeatures"_lis; + return "https://aka.ms/winget-experimentalfeatures"_liv; } void FeaturesCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/FeaturesCommand.h b/src/AppInstallerCLICore/Commands/FeaturesCommand.h index 91e7d0ec1b..dbc80155e6 100644 --- a/src/AppInstallerCLICore/Commands/FeaturesCommand.h +++ b/src/AppInstallerCLICore/Commands/FeaturesCommand.h @@ -15,7 +15,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/HashCommand.cpp b/src/AppInstallerCLICore/Commands/HashCommand.cpp index a30e7457fb..0d6e01589e 100644 --- a/src/AppInstallerCLICore/Commands/HashCommand.cpp +++ b/src/AppInstallerCLICore/Commands/HashCommand.cpp @@ -30,9 +30,9 @@ namespace AppInstaller::CLI return { Resource::String::HashCommandLongDescription }; } - Utility::LocIndString HashCommand::HelpLink() const + Utility::LocIndView HashCommand::HelpLink() const { - return "https://aka.ms/winget-command-hash"_lis; + return "https://aka.ms/winget-command-hash"_liv; } void HashCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/HashCommand.h b/src/AppInstallerCLICore/Commands/HashCommand.h index 6f5f98b37f..75b58d7acc 100644 --- a/src/AppInstallerCLICore/Commands/HashCommand.h +++ b/src/AppInstallerCLICore/Commands/HashCommand.h @@ -14,7 +14,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/ImportCommand.cpp b/src/AppInstallerCLICore/Commands/ImportCommand.cpp index 2113bab0b1..15084185b6 100644 --- a/src/AppInstallerCLICore/Commands/ImportCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ImportCommand.cpp @@ -33,9 +33,9 @@ namespace AppInstaller::CLI return { Resource::String::ImportCommandLongDescription }; } - Utility::LocIndString ImportCommand::HelpLink() const + Utility::LocIndView ImportCommand::HelpLink() const { - return "https://aka.ms/winget-command-import"_lis; + return "https://aka.ms/winget-command-import"_liv; } void ImportCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ImportCommand.h b/src/AppInstallerCLICore/Commands/ImportCommand.h index 90c532a0d5..86131263d9 100644 --- a/src/AppInstallerCLICore/Commands/ImportCommand.h +++ b/src/AppInstallerCLICore/Commands/ImportCommand.h @@ -15,7 +15,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/InstallCommand.cpp b/src/AppInstallerCLICore/Commands/InstallCommand.cpp index d80f6f9e91..f7808c611e 100644 --- a/src/AppInstallerCLICore/Commands/InstallCommand.cpp +++ b/src/AppInstallerCLICore/Commands/InstallCommand.cpp @@ -86,9 +86,9 @@ namespace AppInstaller::CLI } } - Utility::LocIndString InstallCommand::HelpLink() const + Utility::LocIndView InstallCommand::HelpLink() const { - return "https://aka.ms/winget-command-install"_lis; + return "https://aka.ms/winget-command-install"_liv; } void InstallCommand::ValidateArgumentsInternal(Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/InstallCommand.h b/src/AppInstallerCLICore/Commands/InstallCommand.h index 5dc7337062..ab41da9bff 100644 --- a/src/AppInstallerCLICore/Commands/InstallCommand.h +++ b/src/AppInstallerCLICore/Commands/InstallCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/ListCommand.cpp b/src/AppInstallerCLICore/Commands/ListCommand.cpp index f37e031acb..26640d2005 100644 --- a/src/AppInstallerCLICore/Commands/ListCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ListCommand.cpp @@ -64,9 +64,9 @@ namespace AppInstaller::CLI } } - Utility::LocIndString ListCommand::HelpLink() const + Utility::LocIndView ListCommand::HelpLink() const { - return "https://aka.ms/winget-command-list"_lis; + return "https://aka.ms/winget-command-list"_liv; } void ListCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ListCommand.h b/src/AppInstallerCLICore/Commands/ListCommand.h index 985d3abf07..8d9b7a08c7 100644 --- a/src/AppInstallerCLICore/Commands/ListCommand.h +++ b/src/AppInstallerCLICore/Commands/ListCommand.h @@ -17,7 +17,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/PinCommand.cpp b/src/AppInstallerCLICore/Commands/PinCommand.cpp index 981a3f3213..207e636133 100644 --- a/src/AppInstallerCLICore/Commands/PinCommand.cpp +++ b/src/AppInstallerCLICore/Commands/PinCommand.cpp @@ -13,7 +13,7 @@ namespace AppInstaller::CLI using namespace AppInstaller::Utility::literals; using namespace std::string_view_literals; - Utility::LocIndString s_PinCommand_HelpLink = "https://aka.ms/winget-command-pin"_lis; + Utility::LocIndView s_PinCommand_HelpLink = "https://aka.ms/winget-command-pin"_liv; std::vector> PinCommand::GetCommands() const { @@ -35,7 +35,7 @@ namespace AppInstaller::CLI return { Resource::String::PinCommandLongDescription }; } - Utility::LocIndString PinCommand::HelpLink() const + Utility::LocIndView PinCommand::HelpLink() const { return s_PinCommand_HelpLink; } @@ -89,7 +89,7 @@ namespace AppInstaller::CLI } } - Utility::LocIndString PinAddCommand::HelpLink() const + Utility::LocIndView PinAddCommand::HelpLink() const { return s_PinCommand_HelpLink; } @@ -150,7 +150,7 @@ namespace AppInstaller::CLI } } - Utility::LocIndString PinRemoveCommand::HelpLink() const + Utility::LocIndView PinRemoveCommand::HelpLink() const { return s_PinCommand_HelpLink; } @@ -202,7 +202,7 @@ namespace AppInstaller::CLI } } - Utility::LocIndString PinListCommand::HelpLink() const + Utility::LocIndView PinListCommand::HelpLink() const { return s_PinCommand_HelpLink; } @@ -230,7 +230,7 @@ namespace AppInstaller::CLI return { Resource::String::PinResetCommandLongDescription }; } - Utility::LocIndString PinResetCommand::HelpLink() const + Utility::LocIndView PinResetCommand::HelpLink() const { return s_PinCommand_HelpLink; } diff --git a/src/AppInstallerCLICore/Commands/PinCommand.h b/src/AppInstallerCLICore/Commands/PinCommand.h index 6c115da450..d2eb3184d1 100644 --- a/src/AppInstallerCLICore/Commands/PinCommand.h +++ b/src/AppInstallerCLICore/Commands/PinCommand.h @@ -15,7 +15,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -32,7 +32,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; @@ -50,7 +50,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -67,7 +67,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -82,7 +82,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/RootCommand.cpp b/src/AppInstallerCLICore/Commands/RootCommand.cpp index 907efe8950..6e3ba38d3a 100644 --- a/src/AppInstallerCLICore/Commands/RootCommand.cpp +++ b/src/AppInstallerCLICore/Commands/RootCommand.cpp @@ -148,9 +148,9 @@ namespace AppInstaller::CLI return { Resource::String::ToolDescription }; } - Utility::LocIndString RootCommand::HelpLink() const + Utility::LocIndView RootCommand::HelpLink() const { - return "https://aka.ms/winget-command-help"_lis; + return "https://aka.ms/winget-command-help"_liv; } void RootCommand::Execute(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/RootCommand.h b/src/AppInstallerCLICore/Commands/RootCommand.h index 7a68902110..96fbe73155 100644 --- a/src/AppInstallerCLICore/Commands/RootCommand.h +++ b/src/AppInstallerCLICore/Commands/RootCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; void Execute(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/SearchCommand.cpp b/src/AppInstallerCLICore/Commands/SearchCommand.cpp index 2f08e0a07e..abf5f57071 100644 --- a/src/AppInstallerCLICore/Commands/SearchCommand.cpp +++ b/src/AppInstallerCLICore/Commands/SearchCommand.cpp @@ -61,9 +61,9 @@ namespace AppInstaller::CLI } } - Utility::LocIndString SearchCommand::HelpLink() const + Utility::LocIndView SearchCommand::HelpLink() const { - return "https://aka.ms/winget-command-search"_lis; + return "https://aka.ms/winget-command-search"_liv; } void SearchCommand::ValidateArgumentsInternal(Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/SearchCommand.h b/src/AppInstallerCLICore/Commands/SearchCommand.h index de1d4bd5cc..289147c422 100644 --- a/src/AppInstallerCLICore/Commands/SearchCommand.h +++ b/src/AppInstallerCLICore/Commands/SearchCommand.h @@ -17,7 +17,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/SettingsCommand.cpp b/src/AppInstallerCLICore/Commands/SettingsCommand.cpp index ee567dbc6c..f205a6f228 100644 --- a/src/AppInstallerCLICore/Commands/SettingsCommand.cpp +++ b/src/AppInstallerCLICore/Commands/SettingsCommand.cpp @@ -16,7 +16,7 @@ namespace AppInstaller::CLI constexpr Utility::LocIndView s_ArgumentName_Enable = "enable"_liv; constexpr Utility::LocIndView s_ArgumentName_Disable = "disable"_liv; constexpr Utility::LocIndView s_ArgName_EnableAndDisable = "enable|disable"_liv; - Utility::LocIndString s_SettingsCommand_HelpLink = "https://aka.ms/winget-settings"_lis; + Utility::LocIndView s_SettingsCommand_HelpLink = "https://aka.ms/winget-settings"_liv; } std::vector> SettingsCommand::GetCommands() const @@ -44,7 +44,7 @@ namespace AppInstaller::CLI return { Resource::String::SettingsCommandLongDescription }; } - Utility::LocIndString SettingsCommand::HelpLink() const + Utility::LocIndView SettingsCommand::HelpLink() const { return s_SettingsCommand_HelpLink; } @@ -108,7 +108,7 @@ namespace AppInstaller::CLI return { Resource::String::SettingsExportCommandLongDescription }; } - Utility::LocIndString SettingsExportCommand::HelpLink() const + Utility::LocIndView SettingsExportCommand::HelpLink() const { return s_SettingsCommand_HelpLink; } diff --git a/src/AppInstallerCLICore/Commands/SettingsCommand.h b/src/AppInstallerCLICore/Commands/SettingsCommand.h index 4d1b71ffb0..aee6cffbfd 100644 --- a/src/AppInstallerCLICore/Commands/SettingsCommand.h +++ b/src/AppInstallerCLICore/Commands/SettingsCommand.h @@ -15,7 +15,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; @@ -29,7 +29,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/ShowCommand.cpp b/src/AppInstallerCLICore/Commands/ShowCommand.cpp index 252bab065a..981dd465b7 100644 --- a/src/AppInstallerCLICore/Commands/ShowCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ShowCommand.cpp @@ -49,9 +49,9 @@ namespace AppInstaller::CLI Workflow::CompleteWithSingleSemanticsForValue(valueType); } - Utility::LocIndString ShowCommand::HelpLink() const + Utility::LocIndView ShowCommand::HelpLink() const { - return "https://aka.ms/winget-command-show"_lis; + return "https://aka.ms/winget-command-show"_liv; } void ShowCommand::ValidateArgumentsInternal(Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/ShowCommand.h b/src/AppInstallerCLICore/Commands/ShowCommand.h index fe82ce27f8..2106c0ea27 100644 --- a/src/AppInstallerCLICore/Commands/ShowCommand.h +++ b/src/AppInstallerCLICore/Commands/ShowCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/SourceCommand.cpp b/src/AppInstallerCLICore/Commands/SourceCommand.cpp index 4cd9b8cdbc..ec0583b4e3 100644 --- a/src/AppInstallerCLICore/Commands/SourceCommand.cpp +++ b/src/AppInstallerCLICore/Commands/SourceCommand.cpp @@ -12,7 +12,7 @@ namespace AppInstaller::CLI using namespace AppInstaller::CLI::Execution; using namespace std::string_view_literals; - Utility::LocIndString s_SourceCommand_HelpLink = "https://aka.ms/winget-command-source"_lis; + Utility::LocIndView s_SourceCommand_HelpLink = "https://aka.ms/winget-command-source"_liv; std::vector> SourceCommand::GetCommands() const { @@ -36,7 +36,7 @@ namespace AppInstaller::CLI return { Resource::String::SourceCommandLongDescription }; } - Utility::LocIndString SourceCommand::HelpLink() const + Utility::LocIndView SourceCommand::HelpLink() const { return s_SourceCommand_HelpLink; } @@ -67,7 +67,7 @@ namespace AppInstaller::CLI return { Resource::String::SourceAddCommandLongDescription }; } - Utility::LocIndString SourceAddCommand::HelpLink() const + Utility::LocIndView SourceAddCommand::HelpLink() const { return s_SourceCommand_HelpLink; } @@ -110,7 +110,7 @@ namespace AppInstaller::CLI } } - Utility::LocIndString SourceListCommand::HelpLink() const + Utility::LocIndView SourceListCommand::HelpLink() const { return s_SourceCommand_HelpLink; } @@ -148,7 +148,7 @@ namespace AppInstaller::CLI } } - Utility::LocIndString SourceUpdateCommand::HelpLink() const + Utility::LocIndView SourceUpdateCommand::HelpLink() const { return s_SourceCommand_HelpLink; } @@ -186,7 +186,7 @@ namespace AppInstaller::CLI } } - Utility::LocIndString SourceRemoveCommand::HelpLink() const + Utility::LocIndView SourceRemoveCommand::HelpLink() const { return s_SourceCommand_HelpLink; } @@ -227,7 +227,7 @@ namespace AppInstaller::CLI } } - Utility::LocIndString SourceResetCommand::HelpLink() const + Utility::LocIndView SourceResetCommand::HelpLink() const { return s_SourceCommand_HelpLink; } @@ -276,7 +276,7 @@ namespace AppInstaller::CLI } } - Utility::LocIndString SourceExportCommand::HelpLink() const + Utility::LocIndView SourceExportCommand::HelpLink() const { return s_SourceCommand_HelpLink; } diff --git a/src/AppInstallerCLICore/Commands/SourceCommand.h b/src/AppInstallerCLICore/Commands/SourceCommand.h index a7b9fd6ca0..80d831c0e2 100644 --- a/src/AppInstallerCLICore/Commands/SourceCommand.h +++ b/src/AppInstallerCLICore/Commands/SourceCommand.h @@ -14,7 +14,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -29,7 +29,7 @@ namespace AppInstaller::CLI Resource::LocString ShortDescription() const override; Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -46,7 +46,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -63,7 +63,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -81,7 +81,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -98,7 +98,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; @@ -115,7 +115,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override; diff --git a/src/AppInstallerCLICore/Commands/UninstallCommand.cpp b/src/AppInstallerCLICore/Commands/UninstallCommand.cpp index 5c3f0594a6..1da7c92b3f 100644 --- a/src/AppInstallerCLICore/Commands/UninstallCommand.cpp +++ b/src/AppInstallerCLICore/Commands/UninstallCommand.cpp @@ -82,9 +82,9 @@ namespace AppInstaller::CLI } } - Utility::LocIndString UninstallCommand::HelpLink() const + Utility::LocIndView UninstallCommand::HelpLink() const { - return "https://aka.ms/winget-command-uninstall"_lis; + return "https://aka.ms/winget-command-uninstall"_liv; } void UninstallCommand::ValidateArgumentsInternal(Execution::Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/UninstallCommand.h b/src/AppInstallerCLICore/Commands/UninstallCommand.h index 6c950995c0..8c531cfa12 100644 --- a/src/AppInstallerCLICore/Commands/UninstallCommand.h +++ b/src/AppInstallerCLICore/Commands/UninstallCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp b/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp index aa3f828aa5..a1df44d719 100644 --- a/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp +++ b/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp @@ -166,9 +166,9 @@ namespace AppInstaller::CLI } } - Utility::LocIndString UpgradeCommand::HelpLink() const + Utility::LocIndView UpgradeCommand::HelpLink() const { - return "https://aka.ms/winget-command-upgrade"_lis; + return "https://aka.ms/winget-command-upgrade"_liv; } void UpgradeCommand::ValidateArgumentsInternal(Execution::Args& execArgs) const diff --git a/src/AppInstallerCLICore/Commands/UpgradeCommand.h b/src/AppInstallerCLICore/Commands/UpgradeCommand.h index f977e19b85..090cedebb8 100644 --- a/src/AppInstallerCLICore/Commands/UpgradeCommand.h +++ b/src/AppInstallerCLICore/Commands/UpgradeCommand.h @@ -16,7 +16,7 @@ namespace AppInstaller::CLI void Complete(Execution::Context& context, Execution::Args::Type valueType) const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ValidateArgumentsInternal(Execution::Args& execArgs) const override; diff --git a/src/AppInstallerCLICore/Commands/ValidateCommand.cpp b/src/AppInstallerCLICore/Commands/ValidateCommand.cpp index deedcc5adb..f11d8647b7 100644 --- a/src/AppInstallerCLICore/Commands/ValidateCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ValidateCommand.cpp @@ -28,9 +28,9 @@ namespace AppInstaller::CLI return Resource::LocString{ Resource::String::ValidateCommandLongDescription }; } - Utility::LocIndString ValidateCommand::HelpLink() const + Utility::LocIndView ValidateCommand::HelpLink() const { - return "https://aka.ms/winget-command-validate"_lis; + return "https://aka.ms/winget-command-validate"_liv; } void ValidateCommand::ExecuteInternal(Execution::Context& context) const diff --git a/src/AppInstallerCLICore/Commands/ValidateCommand.h b/src/AppInstallerCLICore/Commands/ValidateCommand.h index 9813da616f..6c69cf4482 100644 --- a/src/AppInstallerCLICore/Commands/ValidateCommand.h +++ b/src/AppInstallerCLICore/Commands/ValidateCommand.h @@ -14,7 +14,7 @@ namespace AppInstaller::CLI virtual Resource::LocString ShortDescription() const override; virtual Resource::LocString LongDescription() const override; - Utility::LocIndString HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override;