Reacting to hosting rename

This commit is contained in:
John Luo 2016-01-17 18:16:09 -08:00
parent 3277f68768
commit 1d9be8728e
2 changed files with 5 additions and 7 deletions

View File

@ -121,14 +121,12 @@ namespace IdentitySample
// Entry point for the application.
public static void Main(string[] args)
{
var config = WebApplicationConfiguration.GetDefault(args);
var application = new WebApplicationBuilder()
.UseConfiguration(config)
var host = new WebHostBuilder()
.UseDefaultConfiguration(args)
.UseStartup<Startup>()
.Build();
application.Run();
host.Run();
}
}
}

View File

@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Identity.InMemory
[Fact]
public void UseIdentityThrowsWithoutAddIdentity()
{
var builder = new WebApplicationBuilder()
var builder = new WebHostBuilder()
.Configure(app => app.UseIdentity());
Assert.Throws<InvalidOperationException>(() => new TestServer(builder));
}
@ -182,7 +182,7 @@ namespace Microsoft.AspNet.Identity.InMemory
private static TestServer CreateServer(Action<IServiceCollection> configureServices = null, Func<HttpContext, Task> testpath = null, Uri baseAddress = null)
{
var builder = new WebApplicationBuilder()
var builder = new WebHostBuilder()
.Configure(app =>
{
app.UseIdentity();