Removed the null check for IApplicationBuilder
This commit is contained in:
parent
559f5491d4
commit
a5ab614937
|
|
@ -57,7 +57,7 @@ namespace Microsoft.AspNet.Hosting.Startup
|
|||
|
||||
private object Invoke(MethodInfo methodInfo, object instance, IApplicationBuilder builder, IServiceCollection services = null)
|
||||
{
|
||||
var serviceProvider = builder?.ApplicationServices ?? _services;
|
||||
var serviceProvider = builder.ApplicationServices ?? _services;
|
||||
var parameterInfos = methodInfo.GetParameters();
|
||||
var parameters = new object[parameterInfos.Length];
|
||||
for (var index = 0; index != parameterInfos.Length; ++index)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Microsoft.AspNet.Hosting.Tests
|
|||
|
||||
var startup = manager.LoadStartup("Microsoft.AspNet.Hosting.Tests", "WithServices");
|
||||
|
||||
startup.Invoke(null);
|
||||
startup.Invoke(new ApplicationBuilder(services));
|
||||
|
||||
Assert.Equal(2, _configurationMethodCalledList.Count);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue