private static IHost CreateWebJobsHost <T>(string path)
            where T : FunctionsStartup, new()
        {
            string contentRoot = GetProjectPath(path, typeof(T));

            return(new HostBuilder()
                   .UseContentRoot(contentRoot)
                   .ConfigureLogging(b => b.AddConsole())
                   .ConfigureAppConfiguration(b => b
                                              .Add(AzureFunctionsConfiguration.CreateRoot())
                                              .Add(new HostJsonFileConfigurationSource(contentRoot))
                                              .Add(EnvironmentConfig.FromLocalSettings(contentRoot)))
                   .ConfigureWebJobs((c, b) => b
                                     .UseWebJobsStartup(typeof(T), new WebJobsBuilderContext {
                Configuration = c.Configuration
            }, NullLoggerFactory.Instance)
                                     .AddDurableTask())
                   .Build());
        }