Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jkone27
Copy link

@jkone27 jkone27 commented Dec 5, 2021

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
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant