forked from xkjyeah/openvpnserv2
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathOpenVPNServiceConfiguration.cs
More file actions
38 lines (34 loc) · 1.12 KB
/
OpenVPNServiceConfiguration.cs
File metadata and controls
38 lines (34 loc) · 1.12 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
using System;
using System.Diagnostics;
namespace OpenVpn
{
class OpenVpnServiceConfiguration
{
public string exePath { get; set; }
public string configExt { get; set; }
public string configDir { get; set; }
public string logDir { get; set; }
public bool logAppend { get; set; }
/// <summary>
/// Delegate used to log messages with a specified severity level.
/// </summary>
public Action<string, EventLogEntryType> Log;
/// <summary>
/// Constructs OpenVpnServiceConfiguration object
/// </summary>
/// <param name="logAction">Log callback</param>
public OpenVpnServiceConfiguration(Action<string, EventLogEntryType> logAction)
{
Log = logAction;
}
/// <summary>
/// Writes log message via log callback
/// </summary>
/// <param name="message"></param>
/// <param name="type"></param>
public void LogMessage(string message, EventLogEntryType type = EventLogEntryType.Information)
{
Log(message, type);
}
}
}