Switch from tabs to spaces
This commit is contained in:
parent
fe3675a9e0
commit
e95472e953
|
|
@ -29,18 +29,18 @@ namespace Microsoft.AspNet.Hosting.Startup
|
|||
{
|
||||
var methodNameWithEnv = string.Format(CultureInfo.InvariantCulture, methodName, environmentName);
|
||||
var methodNameWithNoEnv = string.Format(CultureInfo.InvariantCulture, methodName, "");
|
||||
var methodInfo = startupType.GetMethod(methodNameWithEnv, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)
|
||||
?? startupType.GetMethod(methodNameWithNoEnv, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
|
||||
if (methodInfo == null)
|
||||
var methodInfo = startupType.GetMethod(methodNameWithEnv, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)
|
||||
?? startupType.GetMethod(methodNameWithNoEnv, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
|
||||
if (methodInfo == null)
|
||||
{
|
||||
if (required)
|
||||
{
|
||||
throw new Exception(string.Format("TODO: {0} or {1} method not found",
|
||||
methodNameWithEnv,
|
||||
methodNameWithNoEnv));
|
||||
{
|
||||
throw new Exception(string.Format("TODO: {0} or {1} method not found",
|
||||
methodNameWithEnv,
|
||||
methodNameWithNoEnv));
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (returnType != null && methodInfo.ReturnType != returnType)
|
||||
{
|
||||
|
|
@ -160,7 +160,7 @@ namespace Microsoft.AspNet.Hosting.Startup
|
|||
}
|
||||
else
|
||||
{
|
||||
// void ConfigureServices(IServiceCollection)
|
||||
// void ConfigureServices(IServiceCollection)
|
||||
Invoke(servicesMethod, instance, builder, services);
|
||||
if (builder != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Hosting.Fakes
|
|||
});
|
||||
}
|
||||
|
||||
public void ConfigureRetailServices(IServiceCollection services)
|
||||
public void ConfigureRetailServices(IServiceCollection services)
|
||||
{
|
||||
services.AddOptions();
|
||||
services.Configure<FakeOptions>(o =>
|
||||
|
|
@ -94,8 +94,8 @@ namespace Microsoft.AspNet.Hosting.Fakes
|
|||
return services.BuildServiceProvider();
|
||||
}
|
||||
|
||||
public virtual void Configure(IApplicationBuilder builder)
|
||||
{
|
||||
}
|
||||
}
|
||||
public virtual void Configure(IApplicationBuilder builder)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -15,15 +15,15 @@ namespace Microsoft.AspNet.Hosting.Fakes
|
|||
{
|
||||
}
|
||||
|
||||
public void ConfigureBaseClassServices(IServiceCollection services)
|
||||
{
|
||||
services.AddOptions();
|
||||
services.Configure<FakeOptions>(o =>
|
||||
{
|
||||
o.Configured = true;
|
||||
o.Environment = "BaseClass";
|
||||
});
|
||||
}
|
||||
public void ConfigureBaseClassServices(IServiceCollection services)
|
||||
{
|
||||
services.AddOptions();
|
||||
services.Configure<FakeOptions>(o =>
|
||||
{
|
||||
o.Configured = true;
|
||||
o.Environment = "BaseClass";
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -42,8 +42,8 @@ namespace Microsoft.AspNet.Hosting.Tests
|
|||
[InlineData("StaticProvider")]
|
||||
[InlineData("Provider")]
|
||||
[InlineData("ProviderArgs")]
|
||||
[InlineData("BaseClass")]
|
||||
public void StartupClassAddsConfigureServicesToApplicationServices(string environment)
|
||||
[InlineData("BaseClass")]
|
||||
public void StartupClassAddsConfigureServicesToApplicationServices(string environment)
|
||||
{
|
||||
var services = HostingServices.Create().BuildServiceProvider();
|
||||
var manager = services.GetRequiredService<IStartupManager>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue