/// <summary> /// Creates an instance of the Virtual Services Framework Windows Service (VSFWinServ) object /// </summary> /// <param name="ConfigurationFolder">The folder where the services configuration file is located.</param> public VSFWinServ(string ConfigurationFolder) { // Initialize your object InitializeComponent(); // Setup the Windows Service this.CanStop = true; this.CanPauseAndContinue = true; this.CanHandlePowerEvent = true; this.AutoLog = true; // Setup the virtual services manager _virServMgr = new VirtualServicesManager(ConfigurationFolder); }
/// <summary> /// This method will start the services /// </summary> protected void StartServices() { Console.WriteLine("Creating ServicesManager..."); _virServMgr = new VirtualServicesManager(ConfigurationFolder); Console.WriteLine("\t...ServicesManager Created"); Console.WriteLine("Initializing ServicesManager..."); _virServMgr.Initialize(); Console.WriteLine("\t...ServicesManager Initialized"); Console.WriteLine("Starting Virtual Services..."); _virServMgr.StartServices(); Console.WriteLine("\t...Virtual Services Started"); }