Implementing code review feedback

This commit is contained in:
Louis DeJardin 2014-02-10 18:18:10 -08:00
parent f59d29b5eb
commit 14679a78ee
3 changed files with 9 additions and 7 deletions

View File

@ -40,16 +40,16 @@ namespace Microsoft.AspNet.Hosting
LifecycleKind lifecycle) LifecycleKind lifecycle)
{ {
var serviceTypeName = serviceType.FullName; var serviceTypeName = serviceType.FullName;
var implemenationTypeName = configuration.Get(serviceTypeName); var implementationTypeName = configuration.Get(serviceTypeName);
if (!String.IsNullOrEmpty(implemenationTypeName)) if (!String.IsNullOrEmpty(implementationTypeName))
{ {
try try
{ {
implementationType = Type.GetType(implemenationTypeName); implementationType = Type.GetType(implementationTypeName);
} }
catch (Exception ex) catch (Exception ex)
{ {
throw new Exception(string.Format("TODO: unable to locate implementation {0} for service {1}", implemenationTypeName, serviceTypeName), ex); throw new Exception(string.Format("TODO: unable to locate implementation {0} for service {1}", implementationTypeName, serviceTypeName), ex);
} }
} }
return new ServiceTypeDescriptor(serviceType, implementationType, lifecycle); return new ServiceTypeDescriptor(serviceType, implementationType, lifecycle);

View File

@ -1,10 +1,12 @@
using System;
namespace Microsoft.AspNet.Hosting.Server namespace Microsoft.AspNet.Hosting.Server
{ {
public class ServerManager : IServerManager public class ServerManager : IServerManager
{ {
public IServerFactory GetServer(string serverName) public IServerFactory GetServer(string serverName)
{ {
throw new System.NotImplementedException(); throw new NotImplementedException();
} }
} }
} }

View File

@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Hosting.Startup
public Action<IBuilder> LoadStartup(string applicationName, IList<string> diagnosticMessages) public Action<IBuilder> LoadStartup(string applicationName, IList<string> diagnosticMessages)
{ {
if (String.IsNullOrWhiteSpace(applicationName)) if (String.IsNullOrEmpty(applicationName))
{ {
return _next.LoadStartup(applicationName, diagnosticMessages); return _next.LoadStartup(applicationName, diagnosticMessages);
} }