private static void Main(string[] args)
 {
     if (args.Contains("--console"))
     {
         using var subscriptionGuard = new SubscriptionGuard();
         subscriptionGuard.startGuarding();
         KEEP_PROGRAM_RUNNING.WaitOne();
     }
     else
     {
         ServiceBase.Run(new Service());
     }
 }
Beispiel #2
0
 protected override void OnStart(string[] args)
 {
     subscriptionGuard = new SubscriptionGuard();
     subscriptionGuard.startGuarding();
 }