Handle null configuration in HostingServices.Create
This commit is contained in:
parent
bd5c07d66a
commit
075edc516c
|
|
@ -32,11 +32,12 @@ namespace Microsoft.AspNet.Hosting
|
|||
|
||||
public static IServiceCollection Create(IConfiguration configuration = null)
|
||||
{
|
||||
return Create(CallContextServiceLocator.Locator.ServiceProvider);
|
||||
return Create(CallContextServiceLocator.Locator.ServiceProvider, configuration);
|
||||
}
|
||||
|
||||
public static IServiceCollection Create(IServiceProvider fallbackServices, IConfiguration configuration = null)
|
||||
{
|
||||
configuration = configuration ?? new Configuration();
|
||||
var services = Import(fallbackServices);
|
||||
services.Add(GetDefaultServices(configuration));
|
||||
services.AddSingleton<IServiceManifest>(sp => new HostingManifest(fallbackServices));
|
||||
|
|
|
|||
Loading…
Reference in New Issue