Repository navigation
Add Host.CreateDefaultBuilder and some dependencies - #637
Conversation
|
tests failed |
5354bfe to
3e56357
Compare
|
Reverted the ApplicationName change, GetEntryAssembly doesn't work from command line tests (only VS). |
|
I think the breaking change is fine here as it will only break implementors. We made a similar change to the header collection in 2.0 adding content length. If the bar is higher then we can add a new interface and do ilight up using an extension method. |
|
Yeah, I have no expectation this one will break any consumers. |
| { | ||
| var builder = new HostBuilder(); | ||
|
|
||
| builder.UseContentRoot(Directory.GetCurrentDirectory()); |
There was a problem hiding this comment.
Do we need the check we have in the other logic for the env var override?
There was a problem hiding this comment.
No, Host builder doesn't include env var config by default. We add it afterwards and it overrides.
There was a problem hiding this comment.
OK just make sure the scrnaeio fixed is indeed fixed here as well.
| _serviceProviderFactory = serviceProviderFactory ?? throw new ArgumentNullException(nameof(serviceProviderFactory)); | ||
| } | ||
|
|
||
| public ServiceFactoryAdapter(Func<HostBuilderContext> contextResolver, Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factoryResolver) |
There was a problem hiding this comment.
Why a func for the HostBuilderContext? Why not just pass it directly?
There was a problem hiding this comment.
Because HostBuilderContext isn't created until you call Build and this gets called first.
davidfowl
left a comment
There was a problem hiding this comment.
I can’t read the tests. Too much churn 😬
…s#637) Commit migrated from dotnet/extensions@ea0df66
…s#637) Commit migrated from dotnet/extensions@ea0df66
…s#637) Commit migrated from dotnet/extensions@ea0df66
…s#637) Commit migrated from dotnet/extensions@ea0df66
#597 Host.CreateDefaultBuilder
#612 UseServiceProviderFactory overloads (breaking interface addition) 👍 👎 ?
aspnet/Hosting#1418 UseDefaultServiceProvider
Ensure ApplicationName has a default value.Moved the Internal.Host tests to the internal folder due to name conflicts.