Inheritance: System.ServiceProcess.ServiceBase
Beispiel #1
0
        /// <summary>
        /// Service entry point.  Starts the WaveBox Service, which will then launch the application
        /// </summary>
        static void Main(string[] args)
        {
            // Setup the dependency injection
            InjectClasses();

            WaveBoxService service = new WaveBoxService();

            if (Environment.UserInteractive)
            {
                // Allow use to run as a regular console program on Windows
                Console.WriteLine("Press enter to exit");
                Console.ReadLine();
            }
            else
            {
                // Create an instance of the service, run it!
                ServiceBase[] serviceBase = new ServiceBase[] { service };
                ServiceBase.Run(serviceBase);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Service entry point.  Starts the WaveBox Service, which will then launch the application
        /// </summary>
        static void Main(string[] args)
        {
            // Setup the dependency injection
            InjectClasses();

            WaveBoxService service = new WaveBoxService();
            if (Environment.UserInteractive)
            {
                // Allow use to run as a regular console program on Windows
                Console.WriteLine("Press enter to exit");
                Console.ReadLine();
            }
            else
            {
                // Create an instance of the service, run it!
                ServiceBase[] serviceBase = new ServiceBase[] { service };
                ServiceBase.Run(serviceBase);
            }
        }