Beispiel #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            ReportBuilderService ds = new ReportBuilderService();

#if DEBUG
            Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
            string[] args = new string[0];
            ds.OnStart(args);


            System.Console.WriteLine("Please press enter to exit the console application.");
            System.Console.Read();

            ds.OnStop();
#else
            ServiceBase[] ServicesToRun;

            // More than one user Service may run within the same process. To add
            // another service to this process, change the following line to
            // create a second service object. For example,
            //
            //   ServicesToRun = new ServiceBase[] {new Service1(), new MySecondUserService()};
            //
            ServicesToRun = new ServiceBase[] { ds };

            ServiceBase.Run(ServicesToRun);
#endif
        }
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            ReportBuilderService ds = new ReportBuilderService();

            #if DEBUG
            Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
            string[] args = new string[0];
            ds.OnStart(args);

            System.Console.WriteLine("Please press enter to exit the console application.");
            System.Console.Read();

            ds.OnStop();

            #else

            ServiceBase[] ServicesToRun;

            // More than one user Service may run within the same process. To add
            // another service to this process, change the following line to
            // create a second service object. For example,
            //
            //   ServicesToRun = new ServiceBase[] {new Service1(), new MySecondUserService()};
            //
            ServicesToRun = new ServiceBase[] { ds };

            ServiceBase.Run(ServicesToRun);
            #endif
        }