framework icon indicating copy to clipboard operation
framework copied to clipboard

Add way to create a WebApplication without the defaults

Open davidfowl opened this issue 4 years ago • 3 comments

Maybe we need 2 overloads:

  • WebApplication.CreateBuilder - Less stuff? console logger and no configuration providers.
  • WebApplication.CreateDefaultBuilder - What we have today

OR do we do nothing and require users to clear logging and configuration providers.

davidfowl avatar Mar 01 '21 06:03 davidfowl

No configuration provider for the CreateBuilder overload ? This won't take any string[] args then ?

I don't think my opinion is required but both would be good, maybe expose an extension method to clear both providers and make an overload that call it after creating the builder instead of an almost empty builder ?

thenameless314159 avatar Mar 02 '21 07:03 thenameless314159

I'm worried about the choices. Too many choices would confuse people so what the defaults are and what are in them need to be intuitive.

davidfowl avatar Mar 02 '21 07:03 davidfowl

I see, since feather aim to provide more straightforward webhost building logic you can't expect people to knows what the aspnetcore WebHost.CreateDefaultBuilder() does (since the default feather webhost make rather similar registrations if I'm not mistaken) ?

thenameless314159 avatar Mar 02 '21 07:03 thenameless314159