changing to use list instead of stack
This commit is contained in:
parent
69034b78b8
commit
a3314a4805
|
|
@ -21,7 +21,7 @@ namespace Microsoft.AspNet.Mvc
|
||||||
public UrlHelper(IContextAccessor<ActionContext> contextAccessor, IActionSelector actionSelector)
|
public UrlHelper(IContextAccessor<ActionContext> contextAccessor, IActionSelector actionSelector)
|
||||||
{
|
{
|
||||||
_httpContext = contextAccessor.Value.HttpContext;
|
_httpContext = contextAccessor.Value.HttpContext;
|
||||||
_router = contextAccessor.Value.RouteData.Routers.Peek();
|
_router = contextAccessor.Value.RouteData.Routers[0];
|
||||||
_ambientValues = contextAccessor.Value.RouteData.Values;
|
_ambientValues = contextAccessor.Value.RouteData.Values;
|
||||||
_actionSelector = actionSelector;
|
_actionSelector = actionSelector;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test
|
||||||
{
|
{
|
||||||
Values = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase),
|
Values = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase),
|
||||||
};
|
};
|
||||||
routeData.Routers.Push(new Mock<IRouter>().Object);
|
routeData.Routers.Add(new Mock<IRouter>().Object);
|
||||||
|
|
||||||
return new ActionContext(httpContext,
|
return new ActionContext(httpContext,
|
||||||
routeData,
|
routeData,
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test
|
||||||
Values = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase),
|
Values = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase),
|
||||||
};
|
};
|
||||||
|
|
||||||
routeData.Routers.Push(new Mock<IRouter>(MockBehavior.Strict).Object);
|
routeData.Routers.Add(new Mock<IRouter>(MockBehavior.Strict).Object);
|
||||||
|
|
||||||
var httpContext = new Mock<HttpContext>(MockBehavior.Strict);
|
var httpContext = new Mock<HttpContext>(MockBehavior.Strict);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test
|
||||||
{
|
{
|
||||||
var routeData = new RouteData();
|
var routeData = new RouteData();
|
||||||
routeData.Values = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
|
routeData.Values = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
|
||||||
routeData.Routers.Push(router);
|
routeData.Routers.Add(router);
|
||||||
|
|
||||||
var actionContext = new ActionContext(context,
|
var actionContext = new ActionContext(context,
|
||||||
routeData,
|
routeData,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue