From f3de0948150e41902c768b503e20a984fbb2b904 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 30 Mar 2015 18:19:35 -0700 Subject: [PATCH] React to hosting --- .../KestrelWebSocketHelpers.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/Microsoft.AspNet.WebSockets.Client.Test/KestrelWebSocketHelpers.cs b/test/Microsoft.AspNet.WebSockets.Client.Test/KestrelWebSocketHelpers.cs index 86686dab39..c770695eaa 100644 --- a/test/Microsoft.AspNet.WebSockets.Client.Test/KestrelWebSocketHelpers.cs +++ b/test/Microsoft.AspNet.WebSockets.Client.Test/KestrelWebSocketHelpers.cs @@ -8,6 +8,7 @@ using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Hosting.Startup; using Microsoft.AspNet.Http; using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.Runtime.Infrastructure; namespace Microsoft.AspNet.WebSockets.Client.Test { @@ -45,13 +46,11 @@ namespace Microsoft.AspNet.WebSockets.Client.Test config.Add(new MemoryConfigurationSource()); config.Set("server.urls", "http://localhost:54321"); - var context = new HostingContext() - { - Configuration = config, - ServerFactoryLocation = "Kestrel", - StartupMethods = new StartupMethods(startup, configureServices: null) - }; - return new HostingEngine().Start(context); + var engine = WebHost.CreateEngine(config) + .UseServer("Kestrel") + .UseStartup(startup); + + return engine.Start(); } } } \ No newline at end of file