using System; using System.Collections.Generic; using System.Linq; using System.ServiceProcess; using System.Text; namespace FastForward.Cache { static class Program { /// /// The main entry point for the application. /// static void Main(string[] args) { var cacheService = new CacheService(); if (Environment.UserInteractive) { cacheService.Run(args); Console.WriteLine("Press any key to stop"); Console.ReadKey(true); try { cacheService.Stop(); } catch { } } else { ServiceBase.Run(cacheService); } } } }