Minor cleanup

This commit is contained in:
Yishai Galatzer 2014-02-15 10:18:19 -08:00
parent 5ea11e396d
commit 90daa2587d
3 changed files with 5 additions and 11 deletions

View File

@ -15,7 +15,7 @@ namespace MvcSample.RandomNameSpace
public IActionResultHelper Result { get; private set; }
public HttpContext Context { get; private set; }
public HttpContext Context { get; set; }
public string Index()
{

View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using Microsoft.AspNet.DependencyInjection;
using Microsoft.AspNet.DependencyInjection;
using Microsoft.AspNet.FileSystems;
using Microsoft.AspNet.Mvc.Razor;
using Microsoft.AspNet.Mvc.Routing;
@ -10,10 +8,6 @@ namespace Microsoft.AspNet.Mvc.Startup
{
public class MvcServices
{
private object _lock = new object();
private List<Type> _typesToFinalize = new List<Type>();
public ServiceProvider Services { get; private set; }
public MvcServices(string appRoot)
@ -44,9 +38,9 @@ namespace Microsoft.AspNet.Mvc.Startup
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)

View File

@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Mvc
if (contextProperty != null)
{
contextProperty.SetMethod.Invoke(controller, new [] { context });
contextProperty.SetMethod.Invoke(controller, new object[] { context });
}
return controller;