コード例 #1
0
        public static void Run()
        {
            HostFactory.Run(x =>
            {
                x.RunAsLocalSystem();

                x.SetDescription(UtilHelper.GetAppSetting("ZcbListening_ServiceName"));
                x.SetDisplayName(UtilHelper.GetAppSetting("ZcbListening_ServiceDisplayName"));
                x.SetServiceName(UtilHelper.GetAppSetting("ZcbListening_ServiceDescription"));

                x.Service(factory =>
                {
                    var server = new QuartzServer();
                    server.Initialize();

                    return(server);
                });
            });
        }