// 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); } }
public static void TimerMethod(object state) { IpTracker service = (IpTracker)state; service.TimerMethod(); }