diff --git a/samples/MvcSample/Home2Controller.cs b/samples/MvcSample/Home2Controller.cs index 2ebf8333d2..659980acab 100644 --- a/samples/MvcSample/Home2Controller.cs +++ b/samples/MvcSample/Home2Controller.cs @@ -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() { diff --git a/src/Microsoft.AspNet.Mvc.Startup/MvcServices.cs b/src/Microsoft.AspNet.Mvc.Startup/MvcServices.cs index f1dde37713..763b40a412 100644 --- a/src/Microsoft.AspNet.Mvc.Startup/MvcServices.cs +++ b/src/Microsoft.AspNet.Mvc.Startup/MvcServices.cs @@ -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 _typesToFinalize = new List(); - public ServiceProvider Services { get; private set; } public MvcServices(string appRoot) @@ -44,9 +38,9 @@ namespace Microsoft.AspNet.Mvc.Startup Add(); } - private void Add() where U : T + private void Add() where TU : T { - Services.Add(); + Services.Add(); } private void AddInstance(object instance) diff --git a/src/Microsoft.AspNet.Mvc/DefaultControllerFactory.cs b/src/Microsoft.AspNet.Mvc/DefaultControllerFactory.cs index 0a2df729d7..bd983f6ae9 100644 --- a/src/Microsoft.AspNet.Mvc/DefaultControllerFactory.cs +++ b/src/Microsoft.AspNet.Mvc/DefaultControllerFactory.cs @@ -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;