winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

DebugCommand.h (3075B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include "Command.h"
      5 
      6 #if _DEBUG
      7 
      8 namespace AppInstaller::CLI
      9 {
     10     // Command that is only available with debug builds to aid development.
     11     // Don't create localized strings for use here.
     12     struct DebugCommand final : public Command
     13     {
     14         DebugCommand(std::string_view parent) : Command("debug", {}, parent, Visibility::Hidden) {}
     15 
     16         std::vector<std::unique_ptr<Command>> GetCommands() const override;
     17 
     18         Resource::LocString ShortDescription() const override;
     19         Resource::LocString LongDescription() const override;
     20 
     21     protected:
     22         void ExecuteInternal(Execution::Context& context) const override;
     23     };
     24 
     25     // Outputs the proxy stub registrations for the manifest.
     26     struct DumpProxyStubRegistrationsCommand final : public Command
     27     {
     28         DumpProxyStubRegistrationsCommand(std::string_view parent) : Command("dump-proxystub-reg", {}, parent) {}
     29 
     30         Resource::LocString ShortDescription() const override;
     31         Resource::LocString LongDescription() const override;
     32 
     33     protected:
     34         void ExecuteInternal(Execution::Context& context) const override;
     35     };
     36 
     37     // Outputs some IIDs.
     38     struct DumpInterestingIIDsCommand final : public Command
     39     {
     40         DumpInterestingIIDsCommand(std::string_view parent) : Command("dump-iids", {}, parent) {}
     41 
     42         Resource::LocString ShortDescription() const override;
     43         Resource::LocString LongDescription() const override;
     44 
     45     protected:
     46         void ExecuteInternal(Execution::Context& context) const override;
     47     };
     48 
     49     // Outputs the errors as resources.
     50     struct DumpErrorResourceCommand final : public Command
     51     {
     52         DumpErrorResourceCommand(std::string_view parent) : Command("dump-error-resource", {}, parent) {}
     53 
     54         Resource::LocString ShortDescription() const override;
     55         Resource::LocString LongDescription() const override;
     56 
     57     protected:
     58         void ExecuteInternal(Execution::Context& context) const override;
     59     };
     60 
     61     // Outputs a sixel image.
     62     struct ShowSixelCommand final : public Command
     63     {
     64         ShowSixelCommand(std::string_view parent) : Command("sixel", {}, parent) {}
     65 
     66         std::vector<Argument> GetArguments() const override;
     67 
     68         Resource::LocString ShortDescription() const override;
     69         Resource::LocString LongDescription() const override;
     70 
     71     protected:
     72         void ExecuteInternal(Execution::Context& context) const override;
     73     };
     74 
     75     // Invokes progress display.
     76     struct ProgressCommand final : public Command
     77     {
     78         ProgressCommand(std::string_view parent) : Command("progress", {}, parent) {}
     79 
     80         std::vector<Argument> GetArguments() const override;
     81 
     82         Resource::LocString ShortDescription() const override;
     83         Resource::LocString LongDescription() const override;
     84 
     85     protected:
     86         void ExecuteInternal(Execution::Context& context) const override;
     87     };
     88 }
     89 
     90 #endif