Пример #1
0
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        static void Main(string[] args)
        {
            AntDeployAgentWindowsService s = new AntDeployAgentWindowsService();

            if (Environment.UserInteractive)
            {
                s.RunAsConsole(args);
            }
            else
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[]
                {
                    s
                };
                ServiceBase.Run(ServicesToRun);
            }
        }
Пример #2
0
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        static void Main()
        {
            if (Environment.UserInteractive)
            {
                AntDeployAgentWindowsService s = new AntDeployAgentWindowsService();
                string[] args = { "a", "b" };
                s.start(args);
            }

            else
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[]
                {
                    new AntDeployAgentWindowsService()
                };
                ServiceBase.Run(ServicesToRun);
            }
        }