Implementing code review feedback
This commit is contained in:
parent
f59d29b5eb
commit
14679a78ee
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue