Hacker News new | past | comments | ask | show | jobs | submit login

I use something similar to debug a WCF project:

  private static void Main()
  {
    var serviceHandler = new ServiceHandler();

    if (Environment.UserInteractive)
    {
      serviceHandler.OnStart(null);
      Console.WriteLine("Service started! Press <ENTER> to terminate service.");
      Console.ReadLine();
      serviceHandler.OnStop();
      Console.WriteLine("Service stopped!");
      return;
    }
    
    Run(serviceHandler);
  }



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: