Use IApplicationLifetime.StopApplication instead of

IApplicationShutdown.

React to hosting changes 374526b270
This commit is contained in:
David Fowler 2015-10-14 01:09:11 -07:00
parent ef38f5589d
commit 6aaa3cbe06
3 changed files with 4 additions and 12 deletions

View File

@ -232,7 +232,7 @@ namespace Microsoft.AspNet.Server.Kestrel
_closeError = ExceptionDispatchInfo.Capture(ex);
// Request shutdown so we can rethrow this exception
// in Stop which should be observable.
_appLifetime.RequestShutdown();
_appLifetime.StopApplication();
}
}

View File

@ -7,7 +7,7 @@ using Microsoft.AspNet.Hosting;
namespace Microsoft.AspNet.Server.KestrelTests
{
public class ShutdownNotImplemented : IApplicationLifetime
public class LifetimeNotImplemented : IApplicationLifetime
{
public CancellationToken ApplicationStarted
{
@ -33,15 +33,7 @@ namespace Microsoft.AspNet.Server.KestrelTests
}
}
public CancellationToken ShutdownRequested
{
get
{
throw new NotImplementedException();
}
}
public void RequestShutdown()
public void StopApplication()
{
throw new NotImplementedException();
}

View File

@ -6,7 +6,7 @@ namespace Microsoft.AspNet.Server.KestrelTests
{
public TestServiceContext()
{
AppLifetime = new ShutdownNotImplemented();
AppLifetime = new LifetimeNotImplemented();
Log = new TestKestrelTrace();
DateHeaderValueManager = new TestDateHeaderValueManager();
}