コード例 #1
0
        public static ServiceBase GetServiceBase(string[] args)
        {
            IMultipleServiceManager mgr = Bootstrapper.ServiceManager;

            mgr.ProgramArguments = args;
            return(mgr as ServiceBase);
        }
コード例 #2
0
 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 });
     }
 }