-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClientOptions.cs
More file actions
72 lines (65 loc) · 2.32 KB
/
ClientOptions.cs
File metadata and controls
72 lines (65 loc) · 2.32 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System;
using System.Net;
namespace EventStore.TestClientAPI
{
/// <summary>
/// Data contract for the command-line options accepted by test client.
/// This contract is handled by CommandLine project for .NET
/// </summary>
public sealed class ClientOptions //: IOptions
{
//[ArgDescription(Opts.ShowHelpDescr)]
public bool Help { get; set; }
//[ArgDescription(Opts.ShowVersionDescr)]
public bool Version { get; set; }
//[ArgDescription(Opts.LogsDescr)]
public string Log { get; set; }
//[ArgDescription(Opts.ConfigsDescr)]
public string Config { get; set; }
//[ArgDescription(Opts.DefinesDescr)]
public string[] Defines { get; set; }
//[ArgDescription(Opts.WhatIfDescr, Opts.AppGroup)]
public bool WhatIf { get; set; }
//[ArgDescription(Opts.IpDescr)]
public IPAddress Ip { get; set; }
//[ArgDescription(Opts.TcpPortDescr)]
public int TcpPort { get; set; }
//[ArgDescription(Opts.HttpPortDescr)]
public int HttpPort { get; set; }
public int Timeout { get; set; }
public int ReadWindow { get; set; }
public int WriteWindow { get; set; }
public int PingWindow { get; set; }
//[ArgDescription(Opts.ForceDescr)]
public bool Force { get; set; }
public string[] Command { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public TimeSpan ConnectTimeout { get; set; }
public ClientOptions()
{
Config = "";
Command = new string[] { };
//Help = Opts.ShowHelpDefault;
//Version = Opts.ShowVersionDefault;
//Log = Opts.LogsDefault;
//Defines = Opts.DefinesDefault;
//WhatIf = Opts.WhatIfDefault;
Ip = IPAddress.Loopback;
TcpPort = 1113;
HttpPort = 2113;
Timeout = -1;
ReadWindow = 2000;
WriteWindow = 2000;
PingWindow = 2000;
Force = false;
Username = "admin";
Password = "changeit";
ConnectTimeout = TimeSpan.FromSeconds(2);
}
public ClientOptions(params string[] args) : this()
{
Command = args;
}
}
}