@@ -18,15 +18,15 @@ static void Main(string[] args)
18
18
{
19
19
var p = new FluentCommandLineParser();
20
20
21
- p.Setup<int>("r" )
21
+ p.Setup<int>('r' )
22
22
.Callback(record => RecordID = record)
23
23
.Required();
24
24
25
- p.Setup<string>("v" )
25
+ p.Setup<string>('v' )
26
26
.Callback(value => NewValue = value)
27
27
.Required();
28
28
29
- p.Setup<bool>("s" , "silent")
29
+ p.Setup<bool>('s' , "silent")
30
30
.Callback(silent => InSilentMode = silent)
31
31
.SetDefault(false);
32
32
@@ -35,9 +35,9 @@ static void Main(string[] args)
35
35
```
36
36
### Parser Option Methods
37
37
38
- ` .Setup<int>("r" ) ` Setup an option using a short name,
38
+ ` .Setup<int>('r' ) ` Setup an option using a short name,
39
39
40
- ` .Setup<int>("r" , "record") ` or short and long name.
40
+ ` .Setup<int>('r' , "record") ` or short and long name.
41
41
42
42
` .Required() ` Indicate the option is required and an error should be raised if it is not provided.
43
43
@@ -53,7 +53,7 @@ Many arguments can be collected as part of a list. Types supported are `string`,
53
53
54
54
For example arguments such as
55
55
56
- ` --filenames C:\file1.txt C:\file2.txt C:\file3 .txt `
56
+ ` --filenames C:\file1.txt C:\file2.txt " C:\other file .txt" `
57
57
58
58
can be automatically parsed to a ` List<string> ` using
59
59
```
@@ -63,7 +63,7 @@ static void Main(string[] args)
63
63
64
64
var filenames = new List<string>();
65
65
66
- p.Setup<List<string>>("f" , "filenames")
66
+ p.Setup<List<string>>('f' , "filenames")
67
67
.Callback(items => filenames = items);
68
68
69
69
p.Parse(args);
@@ -81,7 +81,7 @@ output:
81
81
Input file names
82
82
C:\file1.txt
83
83
C:\file2.txt
84
- C:\file3 .txt
84
+ C:\other file .txt
85
85
```
86
86
### Supported Syntax
87
87
` [-|--|/][switch_name][=|:| ][value] `
0 commit comments