// The main entry point for the process public static void Main(string[] args) { if (args.Length > 0) { Log.WriteLine("Starting up"); IpTracker app = new IpTracker(); app.Start(); System.Console.Read(); app.Stop(); Log.WriteLine("Shutting down"); } else { ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new Service() }; ServiceBase.Run(ServicesToRun); } }
/// <summary> /// Set things in motion so your service can do its work. /// </summary> protected override void OnStart(string[] args) { m_app.Start(); }