diff --git a/src/DotNetWorker/Builder/FunctionsApplicationBuilder.cs b/src/DotNetWorker/Builder/FunctionsApplicationBuilder.cs index f08c9185..e1478e4b 100644 --- a/src/DotNetWorker/Builder/FunctionsApplicationBuilder.cs +++ b/src/DotNetWorker/Builder/FunctionsApplicationBuilder.cs @@ -63,18 +63,14 @@ internal FunctionsApplicationBuilder(string[]? args) /// <inheritdoc/> public IDictionary<object, object> Properties => ((IHostApplicationBuilder)_hostApplicationBuilder).Properties; + /// <inheritdoc/> IConfigurationManager IHostApplicationBuilder.Configuration => Configuration; - /// <summary> - /// Gets the set of key/value configuration properties. - /// </summary> - /// <remarks> - /// This can be mutated by adding more configuration sources, which will update its current view. - /// </remarks> + /// <inheritdoc/> public ConfigurationManager Configuration => _hostApplicationBuilder.Configuration; /// <inheritdoc/> - public IHostEnvironment Environment { get; private set; } + public IHostEnvironment Environment => _bootstrapHostBuilder.Context.HostingEnvironment; /// <inheritdoc/> public ILoggingBuilder Logging => _hostApplicationBuilder.Logging; @@ -134,7 +130,6 @@ private IFunctionsWorkerApplicationBuilder InitializeHosting(BootstrapHostBuilde // Grab the HostBuilderContext from the property bag to use in the ConfigureWebHostBuilder. Then // grab the IWebHostEnvironment from the webHostContext. This also matches the instance in the IServiceCollection. //var hostContext = (HostBuilderContext)bootstrapHostBuilder.Properties[typeof(HostBuilderContext)]; - Environment = bootstrapHostBuilder.Context.HostingEnvironment; //Host = new ConfigureHostBuilder(bootstrapHostBuilder.Context, Configuration, Services); //WebHost = new ConfigureWebHostBuilder(webHostContext, Configuration, Services);