Minor cleanup
This commit is contained in:
parent
5ea11e396d
commit
90daa2587d
|
|
@ -15,7 +15,7 @@ namespace MvcSample.RandomNameSpace
|
||||||
|
|
||||||
public IActionResultHelper Result { get; private set; }
|
public IActionResultHelper Result { get; private set; }
|
||||||
|
|
||||||
public HttpContext Context { get; private set; }
|
public HttpContext Context { get; set; }
|
||||||
|
|
||||||
public string Index()
|
public string Index()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
using System;
|
using Microsoft.AspNet.DependencyInjection;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.AspNet.DependencyInjection;
|
|
||||||
using Microsoft.AspNet.FileSystems;
|
using Microsoft.AspNet.FileSystems;
|
||||||
using Microsoft.AspNet.Mvc.Razor;
|
using Microsoft.AspNet.Mvc.Razor;
|
||||||
using Microsoft.AspNet.Mvc.Routing;
|
using Microsoft.AspNet.Mvc.Routing;
|
||||||
|
|
@ -10,10 +8,6 @@ namespace Microsoft.AspNet.Mvc.Startup
|
||||||
{
|
{
|
||||||
public class MvcServices
|
public class MvcServices
|
||||||
{
|
{
|
||||||
private object _lock = new object();
|
|
||||||
|
|
||||||
private List<Type> _typesToFinalize = new List<Type>();
|
|
||||||
|
|
||||||
public ServiceProvider Services { get; private set; }
|
public ServiceProvider Services { get; private set; }
|
||||||
|
|
||||||
public MvcServices(string appRoot)
|
public MvcServices(string appRoot)
|
||||||
|
|
@ -44,9 +38,9 @@ namespace Microsoft.AspNet.Mvc.Startup
|
||||||
Add<IViewEngine, RazorViewEngine>();
|
Add<IViewEngine, RazorViewEngine>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Add<T, U>() where U : T
|
private void Add<T, TU>() where TU : T
|
||||||
{
|
{
|
||||||
Services.Add<T, U>();
|
Services.Add<T, TU>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddInstance<T>(object instance)
|
private void AddInstance<T>(object instance)
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Mvc
|
||||||
|
|
||||||
if (contextProperty != null)
|
if (contextProperty != null)
|
||||||
{
|
{
|
||||||
contextProperty.SetMethod.Invoke(controller, new [] { context });
|
contextProperty.SetMethod.Invoke(controller, new object[] { context });
|
||||||
}
|
}
|
||||||
|
|
||||||
return controller;
|
return controller;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue