CEs element or other configuration parts requiring IWebHostEnvironment instances can have access to it, for example
[<CustomOperationAttribute("custom_bootstrap")>]
member this.CustomBootstrap (state : ApplicationState) =
let service (services : IServiceCollection) =
services.CustomBoostrap(
ApplicationBuilder.WebHostEnvironment, //// <<< USED HERE
(Config.getConfiguration(services)),
fun opt ->
opt.ApplicationInformation.ApplicationName <- "Acme.WebApi.Template.ApplicationName"
opt.ApplicationInformation.ApplicationGroup <- "Acme.WebApi.Template.ApplicationGroup"
)
{ state with
ServicesConfig = service::state.ServicesConfig
}
CEs element or other configuration parts requiring IWebHostEnvironment instances can have access to it, for example