Inheritance: System.ServiceProcess.ServiceBase
Example #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            #if DEBUG
            var svc = new KatanaWinSvcSample();
            Console.WriteLine("Starting service...");
            svc.InternalStart();

            Console.WriteLine("Press any key to stop service");
            Console.ReadLine();
            Console.WriteLine("Stopping service...");
            #else
            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[]
            {
                new KatanaWinSvcSample()
            };
            ServiceBase.Run(ServicesToRun);
            #endif
        }
Example #2
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
#if DEBUG
            var svc = new KatanaWinSvcSample();
            Console.WriteLine("Starting service...");
            svc.InternalStart();

            Console.WriteLine("Press any key to stop service");
            Console.ReadLine();
            Console.WriteLine("Stopping service...");
#else
            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[]
            {
                new KatanaWinSvcSample()
            };
            ServiceBase.Run(ServicesToRun);
#endif
        }