Removed the null check for IApplicationBuilder

This commit is contained in:
David Fowler 2014-12-06 10:35:37 -08:00
parent 559f5491d4
commit a5ab614937
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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);
}