-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathProcessArgs.cs
35 lines (26 loc) · 1.09 KB
/
ProcessArgs.cs
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
using McMaster.Extensions.CommandLineUtils;
namespace Meadow.TestNode.Host
{
class ProcessArgs
{
[Option("-p|--port", "TODO.", CommandOptionType.SingleValue)]
public uint Port { get; } = 8747;
[Option("-h|--host", "TODO", CommandOptionType.SingleValue)]
public string Host { get; } = "127.0.0.1";
[Option("-a|--account_count", "TODO", CommandOptionType.SingleValue)]
public uint AccountCount { get; } = 100;
[Option("-b|--account_balance", "TODO", CommandOptionType.SingleValue)]
public uint AccountBalance { get; } = 1000;
[Option("-m|--mnemonic", "TODO", CommandOptionType.SingleValue)]
public string Mnemonic { get; }
[Option("--proxy_node", "TODO", CommandOptionType.SingleValue)]
public string Proxy { get; }
public static ProcessArgs Parse(string[] args)
{
var app = new CommandLineApplication<ProcessArgs>(throwOnUnexpectedArg: true);
app.Conventions.UseDefaultConventions();
app.Parse(args);
return app.Model;
}
}
}