diff options
| author | Rob Mensching <rob@firegiant.com> | 2022-08-11 17:40:06 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2022-08-15 06:49:36 -0700 |
| commit | a6f8b6fa3903d846cdc2fbe715ca951d83af3107 (patch) | |
| tree | e1c554fc6c386c5dc881d288661aa0d1ba0a84a4 /src/tools/heat/HelpCommand.cs | |
| parent | 4a21abbfc4d3b18bda3547a6c792be9f21df356e (diff) | |
| download | wix-a6f8b6fa3903d846cdc2fbe715ca951d83af3107.tar.gz wix-a6f8b6fa3903d846cdc2fbe715ca951d83af3107.tar.bz2 wix-a6f8b6fa3903d846cdc2fbe715ca951d83af3107.zip | |
Redesign command-line help to meet the needs of WiX v4
Diffstat (limited to 'src/tools/heat/HelpCommand.cs')
| -rw-r--r-- | src/tools/heat/HelpCommand.cs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/tools/heat/HelpCommand.cs b/src/tools/heat/HelpCommand.cs index d991b4fa..25d8cd87 100644 --- a/src/tools/heat/HelpCommand.cs +++ b/src/tools/heat/HelpCommand.cs | |||
| @@ -8,12 +8,13 @@ namespace WixToolset.Harvesters | |||
| 8 | using System.Diagnostics; | 8 | using System.Diagnostics; |
| 9 | using System.Threading; | 9 | using System.Threading; |
| 10 | using System.Threading.Tasks; | 10 | using System.Threading.Tasks; |
| 11 | using WixToolset.Extensibility; | ||
| 11 | using WixToolset.Extensibility.Data; | 12 | using WixToolset.Extensibility.Data; |
| 12 | using WixToolset.Extensibility.Services; | 13 | using WixToolset.Extensibility.Services; |
| 13 | using WixToolset.Harvesters.Data; | 14 | using WixToolset.Harvesters.Data; |
| 14 | using WixToolset.Harvesters.Extensibility; | 15 | using WixToolset.Harvesters.Extensibility; |
| 15 | 16 | ||
| 16 | internal class HelpCommand : ICommandLineCommand | 17 | internal class HelpCommand : BaseCommandLineCommand |
| 17 | { | 18 | { |
| 18 | const string HelpMessageOptionFormat = " {0,-7} {1}"; | 19 | const string HelpMessageOptionFormat = " {0,-7} {1}"; |
| 19 | 20 | ||
| @@ -24,17 +25,12 @@ namespace WixToolset.Harvesters | |||
| 24 | 25 | ||
| 25 | private IList<IHeatExtension> Extensions { get; } | 26 | private IList<IHeatExtension> Extensions { get; } |
| 26 | 27 | ||
| 27 | public bool ShowHelp { get; set; } | 28 | public override CommandLineHelp GetCommandLineHelp() |
| 28 | |||
| 29 | public bool ShowLogo | ||
| 30 | { | 29 | { |
| 31 | get => false; | 30 | return null; |
| 32 | set { } | ||
| 33 | } | 31 | } |
| 34 | 32 | ||
| 35 | public bool StopParsing => true; | 33 | public override Task<int> ExecuteAsync(CancellationToken cancellationToken) |
| 36 | |||
| 37 | public Task<int> ExecuteAsync(CancellationToken cancellationToken) | ||
| 38 | { | 34 | { |
| 39 | var exitCode = this.DisplayHelp(); | 35 | var exitCode = this.DisplayHelp(); |
| 40 | return Task.FromResult(exitCode); | 36 | return Task.FromResult(exitCode); |
| @@ -50,8 +46,9 @@ namespace WixToolset.Harvesters | |||
| 50 | Console.WriteLine(); | 46 | Console.WriteLine(); |
| 51 | } | 47 | } |
| 52 | 48 | ||
| 53 | public bool TryParseArgument(ICommandLineParser parser, string argument) | 49 | public override bool TryParseArgument(ICommandLineParser parser, string argument) |
| 54 | { | 50 | { |
| 51 | this.StopParsing = true; | ||
| 55 | return true; | 52 | return true; |
| 56 | } | 53 | } |
| 57 | 54 | ||
