-
Notifications
You must be signed in to change notification settings - Fork 0
/
TCAdminClientConfiguration.cs
86 lines (74 loc) · 2.47 KB
/
TCAdminClientConfiguration.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
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TCAdminWrapper
{
/// <summary>
/// The core configuration for the TCAdmin Client.
/// </summary>
public class TCAdminClientConfiguration
{
/// <summary>
/// This is found in the TCAdmin.Monitor.exe.Config
/// </summary>
public string MySQLString { get; }
public bool MySQLEncrypted { get; }
/// <summary>
/// The Name of this Client.
/// </summary>
public string ApplicationName { get; }
/// <summary>
/// The settings for TCAdmin to follow.
/// </summary>
public TCAdminSettings TcAdminSettings { get; }
public TCAdminClientConfiguration(string mySqlString, bool mySqlEncrypted, string applicationName, TCAdminSettings tcAdminSettings = null)
{
this.MySQLString = mySqlString;
this.MySQLEncrypted = mySqlEncrypted;
this.ApplicationName = applicationName;
this.TcAdminSettings = tcAdminSettings ?? new TCAdminSettings();
}
}
/// <summary>
/// The sub class for TCAdmin to follow.
/// </summary>
public class TCAdminSettings
{
/// <summary>
/// Enable the TCAdmin Cache.
/// </summary>
public bool EnableCache { get; }
/// <summary>
/// Enable debug mode for the application
/// </summary>
public bool Debug { get; }
/// <summary>
/// Print all SQL debug information.
/// </summary>
public bool DebugSql { get; }
/// <summary>
/// Print all traffic packets information.
/// </summary>
public bool DebugPackets { get; }
/// <summary>
/// Set the path to store TCAdmin logs.
/// </summary>
public string LogPath { get; }
/// <summary>
/// Set the path to store TCAdmin cache.
/// </summary>
public string CachePath { get; }
public TCAdminSettings(bool enableCache = true, bool debug = false, bool debugSql = false, bool debugPackets = false,
string logPath = "./Logs", string cachePath = "./Cache")
{
this.EnableCache = enableCache;
this.Debug = debug;
this.DebugSql = debugSql;
this.DebugPackets = debugPackets;
this.LogPath = logPath;
this.CachePath = cachePath;
}
}
}