public static void Main(string[] args) { Thread.CurrentThread.Name = "Main thread"; WebCamService ServiceToRun = new WebCamService() ; if ( Debugger.IsAttached ) { ServiceToRun.Run(); } else { ServiceToRun.CanPauseAndContinue = false; ServiceBase.Run(ServiceToRun); } }
public static void Main(string[] args) { Thread.CurrentThread.Name = "Main thread"; WebCamService ServiceToRun = new WebCamService(); if (Debugger.IsAttached) { ServiceToRun.Run(); } else { ServiceToRun.CanPauseAndContinue = false; ServiceBase.Run(ServiceToRun); } }