netmonitor/NetMonitorServer/Factory.cs

26 lines
748 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
2015-11-16 01:10:59 +01:00
using System.IO;
using BlubbFish.Utils;
2015-11-16 01:10:59 +01:00
using System.Reflection;
2015-03-04 23:21:34 +01:00
namespace NetMonitorServer {
class Factory {
internal static ActionClass getAction(string className) {
if(className.ToLower() == "net")
return new SetNetworks();
if(className.ToLower() == "service")
return new SetService();
if(className.ToLower() == "openvpn")
return new SetOpenVPNService();
return null;
}
2015-03-04 23:21:34 +01:00
internal static InIReader getSettings() {
2015-11-16 01:10:59 +01:00
string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
return InIReader.getInstance(path + "\\config.ini");
2015-03-04 23:21:34 +01:00
}
}
}