netmonitor/NetMonitorServer/Factory.cs

26 lines
748 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using BlubbFish.Utils;
using System.Reflection;
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;
}
internal static InIReader getSettings() {
string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
return InIReader.getInstance(path + "\\config.ini");
}
}
}