Use IApplicationLifetime.StopApplication instead of
IApplicationShutdown.
React to hosting changes 374526b270
This commit is contained in:
parent
ef38f5589d
commit
6aaa3cbe06
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ namespace Microsoft.AspNet.Server.KestrelTests
|
|||
{
|
||||
public TestServiceContext()
|
||||
{
|
||||
AppLifetime = new ShutdownNotImplemented();
|
||||
AppLifetime = new LifetimeNotImplemented();
|
||||
Log = new TestKestrelTrace();
|
||||
DateHeaderValueManager = new TestDateHeaderValueManager();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue