Replies: 2 comments 1 reply
|
Marten's bootstrapping is much simpler. And my muscle memory is all from the early days when Wolverine only supported IHostBuilder, that's all. I'm deeply unenthusiastic. Why would you need that? You can use the IConfiguration at bootstrapping time anyway. You can also inject IWolverineExtension at will for weird DI reliant configuration. I'd take syntactic sugar helpers to make that quicker w/ an inline lambda I suppose. @penenkel But if you really care: Feel very free to contact us at sales@jasperfx.net about that one. I'm converting this to a discussion |
|
I will look into IWolverineExtension, I have not investigated that yet. I ran into this trying to cobble together a testing harness. I haven't worked with AspNetCore for a while, so I naively assumed the following would work wrt. providing the expected configuration values. But this does not work for any configuration that is accessed before |
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
I would like to be able to late-bind configuration values. For that the usual pattern is to access IConfiguration via the IServiceProvider while configuring the options in a
.Add<Service>(provider => <Service>Options)extension.Describe the solution you'd like
Add
AddWolverine(this IServiceCollection services, Func<IServiceProvider, WolverineOptions> optionSource)overload analogue to - for example - theAddMarten(this IServiceCollection services, Func<IServiceProvider, StoreOptions> optionSource )overlaod.Additional context
I also noticed that all documentation and samples use
builder.Host.UseWolverine()instead ofbuilder.Services.AddWolverine(). Is that intentional? As far as I knowbuilder.Hostis just a shim in the AspNetCore framework to provide backwards compatibility for libraries that only offer the old-style integration. As you already provide an.AddWolverineextension, I would have expected that to be the primary and preferred way to setup.All reactions