diff --git a/src/Microsoft.AspNet.Server.Kestrel/ServerInformation.cs b/src/Microsoft.AspNet.Server.Kestrel/KestrelServerInformation.cs similarity index 78% rename from src/Microsoft.AspNet.Server.Kestrel/ServerInformation.cs rename to src/Microsoft.AspNet.Server.Kestrel/KestrelServerInformation.cs index 423c848623..b526b59635 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/ServerInformation.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/KestrelServerInformation.cs @@ -3,14 +3,13 @@ using System; using System.Collections.Generic; -using Microsoft.AspNet.Hosting.Server; using Microsoft.Framework.Configuration; namespace Microsoft.AspNet.Server.Kestrel { - public class ServerInformation : IServerInformation, IKestrelServerInformation + public class KestrelServerInformation : IKestrelServerInformation { - public ServerInformation() + public KestrelServerInformation() { Addresses = new List(); } @@ -32,14 +31,6 @@ namespace Microsoft.AspNet.Server.Kestrel } } - public string Name - { - get - { - return "Kestrel"; - } - } - public IList Addresses { get; private set; } public int ThreadCount { get; set; } diff --git a/src/Microsoft.AspNet.Server.Kestrel/ServerFactory.cs b/src/Microsoft.AspNet.Server.Kestrel/ServerFactory.cs index 0163e9dc16..13b2aaac33 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/ServerFactory.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/ServerFactory.cs @@ -25,17 +25,19 @@ namespace Microsoft.AspNet.Server.Kestrel _appShutdownService = appShutdownService; } - public IServerInformation Initialize(IConfiguration configuration) + public IFeatureCollection Initialize(IConfiguration configuration) { - var information = new ServerInformation(); + var information = new KestrelServerInformation(); information.Initialize(configuration); - return information; + var serverFeatures = new FeatureCollection(); + serverFeatures.Set(information); + return serverFeatures; } - public IDisposable Start(IServerInformation serverInformation, Func application) + public IDisposable Start(IFeatureCollection serverFeatures, Func application) { var disposables = new List(); - var information = (ServerInformation)serverInformation; + var information = (KestrelServerInformation)serverFeatures.Get(); var engine = new KestrelEngine(_libraryManager, _appShutdownService); engine.Start(information.ThreadCount == 0 ? 1 : information.ThreadCount); foreach (var address in information.Addresses)