File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 3
3
4
4
using Axe . Windows . Automation ;
5
5
using CommandLine ;
6
+ using CommandLine . Text ;
6
7
using System ;
7
8
using System . IO ;
8
9
using System . Threading ;
@@ -59,8 +60,18 @@ private int Run()
59
60
{
60
61
using ( var parser = CaseInsensitiveParser ( ) )
61
62
{
62
- parser . ParseArguments < Options > ( _args )
63
- . WithParsed < Options > ( RunWithParsedInputs ) ;
63
+ ParserResult < Options > parserResult = parser . ParseArguments < Options > ( _args ) ;
64
+ parserResult . WithParsed ( RunWithParsedInputs )
65
+ . WithNotParsed ( _ =>
66
+ {
67
+ HelpText helpText = HelpText . AutoBuild ( parserResult , h =>
68
+ {
69
+ h . AutoHelp = false ; // hides --help
70
+ h . AutoVersion = false ; // hides --version
71
+ return HelpText . DefaultParsingErrorsHandler ( parserResult , h ) ;
72
+ } , e => e ) ;
73
+ _writer . WriteLine ( helpText ) ;
74
+ } ) ;
64
75
}
65
76
}
66
77
#pragma warning disable CA1031
Original file line number Diff line number Diff line change @@ -36,10 +36,6 @@ Copyright c 2020
36
36
a default of 0.
37
37
38
38
--customuia The path to a configuration file specifying custom UI Automation attributes
39
-
40
- --help Display this help screen.
41
-
42
- --version Display version information.
43
39
```
44
40
45
41
To scan an application, you need to specify the application's process via either the ` --processId ` or ` --processName ` parameters
You can’t perform that action at this time.
0 commit comments