예제 #1
0
        static void Main(string[] args)
        {
#if DEBUG
            var app = new ShamefulOldGitApp();
            app.Start(null);
            Console.ReadKey();
#else
            HostFactory.Run(x =>
            {
                x.Service(s => new ShamefulOldGitApp());

                x.RunAsLocalSystem();

                x.RunAsLocalService();

                x.StartAutomatically();

                x.SetServiceName("ShamefulOldGit");
                x.SetDisplayName("ShamefulOldGit");
                x.SetDescription("Shaming old git commits.");
            });
#endif
        }
예제 #2
0
        static void Main(string[] args)
        {
            #if DEBUG
            var app = new ShamefulOldGitApp();
            app.Start(null);
            Console.ReadKey();
            #else
            HostFactory.Run(x =>
            {
                x.Service(s => new ShamefulOldGitApp());

                x.RunAsLocalSystem();

                x.RunAsLocalService();

                x.StartAutomatically();

                x.SetServiceName("ShamefulOldGit");
                x.SetDisplayName("ShamefulOldGit");
                x.SetDescription("Shaming old git commits.");
            });

            #endif
        }