Exemplo n.º 1
0
        public static async Task Main(string[] args)
        {
            //Create the host
            var host = CreateHostBuilder(args).Build();

            //Show thread availability
            Console.WriteLine(Extensions.GetThreadCount());

            //Run the host
            await host.RunAsync().ConfigureAwait(false);
        }
Exemplo n.º 2
0
        private static async Task Main(string[] args)
        {
            //Create the host
            var host = CreateHostBuilder(args).Build();

            //Show thread availability
            Console.WriteLine(Extensions.GetThreadCount());

            //NOTE: Leave this here to ensure function dependencies resolve on startup rather than when each function method is invoked
            //      It is also also useful when debugging individual jobs locally
            var functions = host.Services.GetService(typeof(Functions));

            //Run the host
            await host.RunAsync().ConfigureAwait(false);
        }