private static Task LaunchAsServiceAsync(string[] args)
        {
            var serviceCore = new ServiceCore();

            ServiceBase.Run(serviceCore);
            return(Task.CompletedTask);
        }
 private static async Task RunAsConsoleAsync(string[] args)
 {
     var core = new ServiceCore();
     await core.ExecuteAsync(args);
 }