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; diff --git a/src/AppInstallerCLICore/Command.h b/src/AppInstallerCLICore/Command.h index 0c2b92c391..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 std::string 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 7c6a22d7e3..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 }; } - std::string CompleteCommand::HelpLink() const + Utility::LocIndView CompleteCommand::HelpLink() const { - return "https://aka.ms/winget-command-complete"; + 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 8734cfb432..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; - std::string 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 ebafad51c0..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 }; } - std::string ExperimentalCommand::HelpLink() const + Utility::LocIndView ExperimentalCommand::HelpLink() const { - return "https://aka.ms/winget-settings"; + 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 cbcd62373a..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; - std::string 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 e963bddca8..bcb33d1738 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::LocIndView ExportCommand::HelpLink() const { - return "https://aka.ms/winget-command-export"; + 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 25e5c985f3..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; - std::string 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 a9484ca5bc..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 }; } - std::string FeaturesCommand::HelpLink() const + Utility::LocIndView FeaturesCommand::HelpLink() const { - return "https://aka.ms/winget-experimentalfeatures"; + 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 879e349193..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; - std::string 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 6d6c18ce9d..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 }; } - std::string HashCommand::HelpLink() const + Utility::LocIndView HashCommand::HelpLink() const { - return "https://aka.ms/winget-command-hash"; + 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 3b395ff9e9..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; - std::string 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 924554ecb7..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 }; } - std::string ImportCommand::HelpLink() const + Utility::LocIndView ImportCommand::HelpLink() const { - return "https://aka.ms/winget-command-import"; + 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 1ab89efea5..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; - std::string 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 c7bfcf0a6f..f7808c611e 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::LocIndView InstallCommand::HelpLink() const { - return "https://aka.ms/winget-command-install"; + 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 cb78ca538c..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; - std::string 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 3828aa44e9..26640d2005 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::LocIndView ListCommand::HelpLink() const { - return "https://aka.ms/winget-command-list"; + 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 a760b959d0..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; - std::string 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 5cdedb26b0..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; - static constexpr std::string_view s_PinCommand_HelpLink = "https://aka.ms/winget-command-pin"sv; + Utility::LocIndView s_PinCommand_HelpLink = "https://aka.ms/winget-command-pin"_liv; std::vector> PinCommand::GetCommands() const { @@ -35,9 +35,9 @@ namespace AppInstaller::CLI return { Resource::String::PinCommandLongDescription }; } - std::string PinCommand::HelpLink() const + Utility::LocIndView 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::LocIndView 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::LocIndView 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::LocIndView 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::LocIndView 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..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; - std::string 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; - std::string 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; - std::string 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; - std::string 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; - std::string 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 4e1bb003fe..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 }; } - std::string RootCommand::HelpLink() const + Utility::LocIndView RootCommand::HelpLink() const { - return "https://aka.ms/winget-command-help"; + 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 87d051eee6..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; - std::string 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 b027d7d2de..abf5f57071 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::LocIndView SearchCommand::HelpLink() const { - return "https://aka.ms/winget-command-search"; + 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 b637d9cbfd..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; - std::string 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 852d437229..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; - static constexpr std::string_view s_SettingsCommand_HelpLink = "https://aka.ms/winget-settings"sv; + Utility::LocIndView s_SettingsCommand_HelpLink = "https://aka.ms/winget-settings"_liv; } std::vector> SettingsCommand::GetCommands() const @@ -44,9 +44,9 @@ namespace AppInstaller::CLI return { Resource::String::SettingsCommandLongDescription }; } - std::string SettingsCommand::HelpLink() const + Utility::LocIndView 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::LocIndView 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..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; - std::string 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; - std::string 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 c2ae41d3ed..981dd465b7 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::LocIndView ShowCommand::HelpLink() const { - return "https://aka.ms/winget-command-show"; + 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 b81467716d..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; - std::string 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 eef961eb81..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; - static constexpr std::string_view s_SourceCommand_HelpLink = "https://aka.ms/winget-command-source"sv; + Utility::LocIndView s_SourceCommand_HelpLink = "https://aka.ms/winget-command-source"_liv; std::vector> SourceCommand::GetCommands() const { @@ -36,9 +36,9 @@ namespace AppInstaller::CLI return { Resource::String::SourceCommandLongDescription }; } - std::string SourceCommand::HelpLink() const + Utility::LocIndView 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::LocIndView 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::LocIndView 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::LocIndView 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::LocIndView 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::LocIndView 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::LocIndView 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..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; - std::string 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; - std::string 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; - std::string 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; - std::string 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; - std::string 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; - std::string 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; - std::string 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 dc27ed19f9..1da7c92b3f 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::LocIndView UninstallCommand::HelpLink() const { - return "https://aka.ms/winget-command-uninstall"; + 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 284a0d74a0..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; - std::string 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 312c3ab248..a1df44d719 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::LocIndView UpgradeCommand::HelpLink() const { - return "https://aka.ms/winget-command-upgrade"; + 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 30f63d9435..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; - std::string 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 73f655caea..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 }; } - std::string ValidateCommand::HelpLink() const + Utility::LocIndView ValidateCommand::HelpLink() const { - return "https://aka.ms/winget-command-validate"; + 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 2cc9d3f9f2..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; - std::string HelpLink() const override; + Utility::LocIndView HelpLink() const override; protected: void ExecuteInternal(Execution::Context& context) const override;