public async Task MainAsync(string[] args) { if (args == null || args.Length != 2) { throw new Exception("Tokens missing as command line argument."); } await Startup.RunAsync(args); await Task.Delay(-1); // Keep the program alive }
public static Task Main(string[] args) => Startup.RunAsync(args);
public static async Task RunAsync(string[] args) { Startup startup = new Startup(args); await startup.RunAsync(); }
public static async Task RunAsync(string[] args) { var startup = new Startup(args[0], args[1]); await startup.RunAsync(); }