Reacting to hosting rename
This commit is contained in:
parent
3277f68768
commit
1d9be8728e
|
|
@ -121,14 +121,12 @@ namespace IdentitySample
|
||||||
// Entry point for the application.
|
// Entry point for the application.
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
var config = WebApplicationConfiguration.GetDefault(args);
|
var host = new WebHostBuilder()
|
||||||
|
.UseDefaultConfiguration(args)
|
||||||
var application = new WebApplicationBuilder()
|
|
||||||
.UseConfiguration(config)
|
|
||||||
.UseStartup<Startup>()
|
.UseStartup<Startup>()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
application.Run();
|
host.Run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Identity.InMemory
|
||||||
[Fact]
|
[Fact]
|
||||||
public void UseIdentityThrowsWithoutAddIdentity()
|
public void UseIdentityThrowsWithoutAddIdentity()
|
||||||
{
|
{
|
||||||
var builder = new WebApplicationBuilder()
|
var builder = new WebHostBuilder()
|
||||||
.Configure(app => app.UseIdentity());
|
.Configure(app => app.UseIdentity());
|
||||||
Assert.Throws<InvalidOperationException>(() => new TestServer(builder));
|
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)
|
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 =>
|
.Configure(app =>
|
||||||
{
|
{
|
||||||
app.UseIdentity();
|
app.UseIdentity();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue