예제 #1
0
파일: Program.cs 프로젝트: kamilion/WISP
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            // Handle running the server service in standalone mode, i.e. outside of the
            // Windows Service sandbox.  Just start the process with the argument
            // "standalone" to run it as a regular application.  You can set this
            // argument in the "Project->Properties->Debug" options for easy debugging.

            if (args.Length == 0 || args[0].ToLower().Trim() != "standalone")
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[] { new WispService() };
                Log1.Logger("Server").Info("Starting server.");
                ServiceBase.Run(ServicesToRun);
            }
            else
            {
                // you will have to manually kill the process either through the
                // debugger or the task manager
                WispService service = new WispService();
                service.Setup();
                System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
            }
        }
예제 #2
0
파일: Program.cs 프로젝트: Amitkapadi/WISP
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            // Handle running the server service in standalone mode, i.e. outside of the
            // Windows Service sandbox.  Just start the process with the argument
            // "standalone" to run it as a regular application.  You can set this
            // argument in the "Project->Properties->Debug" options for easy debugging.

            if (args.Length == 0 || args[0].ToLower().Trim() != "standalone")
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[] { new WispService() };
                Log1.Logger("Server").Info("Starting server.");
                ServiceBase.Run(ServicesToRun);
            }
            else
            {
                // you will have to manually kill the process either through the
                // debugger or the task manager
                WispService service = new WispService();
                service.Setup();
                System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
            }
        }