Revize 914776bd
Přidáno uživatelem Pultak před asi 3 roky(ů)
ld_client/LDClient/appsettings.json | ||
---|---|---|
21 | 21 |
"ApiPort": 8000 |
22 | 22 |
}, |
23 | 23 |
"Cache": { |
24 |
"RetryPeriod": 1, |
|
24 |
"RetryPeriod": 10000,
|
|
25 | 25 |
"MaxEntries": 20, |
26 | 26 |
"MaxRetries": 5, |
27 | 27 |
"CacheFileName": "cache" |
28 | 28 |
}, |
29 | 29 |
"DebuggerDetection": { |
30 |
"DebuggerAddress": "localhost", |
|
31 |
"DebuggerPort": 20000, |
|
32 |
"DebuggerProcessName": "t32mtc" |
|
33 |
} |
|
30 |
"T32Address": "localhost", |
|
31 |
"T32Port": 20000, |
|
32 |
"T32ProcessName": "t32mtc", |
|
33 |
"T32InfoLocation": "C:\\app\\tools\\T32\\results\\ldResult.txt", |
|
34 |
"DetectionPeriod": 5000 |
|
35 |
} |
|
34 | 36 |
} |
ld_client/LDClient/utils/ConfigLoader.cs | ||
---|---|---|
35 | 35 |
#endregion |
36 | 36 |
|
37 | 37 |
#region Detection |
38 |
public string DebuggerAddress { get; set; } |
|
39 |
public int DebuggerPort { get; set; } |
|
40 |
public string DebuggerProcessName { get; set; } |
|
38 |
public string T32Address { get; set; } |
|
39 |
public int T32Port { get; set; } |
|
40 |
public string T32ProcessName { get; set; } |
|
41 |
public uint DetectionPeriod { get; set; } |
|
42 |
public string T32InfoLocation { get; set; } |
|
41 | 43 |
#endregion |
42 | 44 |
|
43 | 45 |
public ConfigLoader() { |
... | ... | |
58 | 60 |
LogCleanupPeriod = int.Parse(logging["LogCleanupPeriod"]); |
59 | 61 |
LogFlowType = (LogFlow)int.Parse(logging["LogFlowType"]); |
60 | 62 |
LogVerbosityType = (LogVerbosity)int.Parse(logging["LogVerbosityType"]); |
61 |
|
|
63 |
|
|
62 | 64 |
var network = configuration.GetSection(NetworkSection); |
63 | 65 |
ApiBaseAddress = network["ApiBaseAddress"]; |
64 | 66 |
ApiUsbEndPoint = network["ApiLDEndPoint"]; |
... | ... | |
73 | 75 |
|
74 | 76 |
|
75 | 77 |
var debugger = configuration.GetSection(DDSection); |
76 |
DebuggerAddress = debugger["DebuggerAddress"]; |
|
77 |
DebuggerPort = int.Parse(debugger["DebuggerPort"]); |
|
78 |
DebuggerProcessName = debugger["DebuggerProcessName"]; |
|
78 |
T32Address = debugger["T32Address"]; |
|
79 |
T32Port = int.Parse(debugger["T32Port"]); |
|
80 |
T32ProcessName = debugger["T32ProcessName"]; |
|
81 |
T32InfoLocation = debugger["T32InfoLocation"]; |
|
82 |
DetectionPeriod = uint.Parse(debugger["DetectionPeriod"]); |
|
79 | 83 |
|
80 | 84 |
Console.WriteLine("Configuration successfully loaded!"); |
81 | 85 |
} catch (FormatException e) { |
Také k dispozici: Unified diff
re #9433 Added needed configuration for detection