Exemplo n.º 1
0
        public static async Task Main(string[] args)
        {
            AppHostBuilder.InitializeLogger(args);

            try
            {
                using var host = AppHostBuilder.Create(args).Build();
                await host.RunAsync();
            }
            catch (Exception ex)
            {
                Log.Fatal(ex, "Host terminated unexpectedly");
            }
            finally
            {
                AppHostBuilder.FlushLogger();
            }
        }