Fix breaking changes from MVC

This commit is contained in:
Ryan Nowak 2014-06-06 11:26:50 -07:00
parent 6d50b397c0
commit d112adc1f2
1 changed files with 7 additions and 2 deletions

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Routing;
namespace Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
{ {
@ -39,8 +40,12 @@ namespace Microsoft.AspNet.Mvc
{ {
LazyInitializer.EnsureInitialized(ref _modelBinder, ref _modelBinderInitialized, ref _modelBinderInitLocker, () => LazyInitializer.EnsureInitialized(ref _modelBinder, ref _modelBinderInitialized, ref _modelBinderInitLocker, () =>
{ {
var requestContext = new RequestContext(Context, ActionContext.RouteValues); var routeContext = new RouteContext(Context)
_compositeValueProvider = new CompositeValueProvider(_valueProviderFactories.Select(vpf => vpf.GetValueProvider(requestContext))); {
RouteData = ActionContext.RouteData,
};
_compositeValueProvider = new CompositeValueProvider(_valueProviderFactories.Select(vpf => vpf.GetValueProvider(routeContext)));
return new CompositeModelBinder(_modelBinders); return new CompositeModelBinder(_modelBinders);
}); });