public static void Main() { var srv = new FileWriterService(); srv.InitializeCollections(); var host = new ServiceHost(srv); host.Open(); Console.WriteLine("Press enter..."); Console.ReadLine(); host.Close(); }
/// <summary> /// The main entry point for the application. /// </summary> static void Main() { var fileWriterService = new FileWriterService(); if (Environment.UserInteractive) { fileWriterService.Debug(null); } else { ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { fileWriterService }; ServiceBase.Run(ServicesToRun); } }