public static ServiceBase GetServiceBase(string[] args) { IMultipleServiceManager mgr = Bootstrapper.ServiceManager; mgr.ProgramArguments = args; return(mgr as ServiceBase); }
static void Main(string[] args) { if (Environment.UserInteractive) { IMultipleServiceManager mgr = Bootstrapper.ServiceManager; mgr.StartServiceManager(); log.Info("Hit enter to stop ..."); Console.ReadLine(); mgr.StopServiceManager(); } else { ServiceBase.Run(new[] { Bootstrapper.ServiceBase }); } }