blob: f3687a8a86ce3178b0069872e23971c2033aa034 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
using System;
namespace Mono.GetOptions
{
public class Options
{
public OptionsParsingMode ParsingMode;
public bool BreakSingleDashManyLettersIntoManyOptions;
public bool EndOptionProcessingWithDoubleDash;
private OptionList optionParser;
public string[] RemainingArguments;
public Options()
{
ParsingMode = OptionsParsingMode.Both;
BreakSingleDashManyLettersIntoManyOptions = false;
EndOptionProcessingWithDoubleDash = true;
}
public void ProcessArgs(string[] args)
{
optionParser = new OptionList(this);
RemainingArguments = optionParser.ProcessArgs(args);
}
[Option("Show this help list", '?',"help")]
public virtual WhatToDoNext DoHelp()
{
return optionParser.DoHelp();
}
[Option("Display version and licensing information", 'V', "version")]
public virtual WhatToDoNext DoAbout()
{
return optionParser.DoAbout();
}
[Option("Show usage syntax and exit", ' ',"usage")]
public virtual WhatToDoNext DoUsage()
{
return optionParser.DoUsage();
}
[Option("Show verbose parsing of options", ' ',"verbosegetoptions")]
public bool VerboseParsingOfOptions
{
set { OptionDetails.Verbose = value;}
}
}
}
|