Passing route collection through the context - for MVC to get access to it.

This commit is contained in:
Ryan Nowak 2014-03-10 10:12:19 -07:00
parent da057820e5
commit 6a309f20d8
2 changed files with 6 additions and 1 deletions

View File

@ -20,6 +20,8 @@ namespace Microsoft.AspNet.Routing
public string RequestPath { get; private set; }
public IRouter Router { get; set; }
public IDictionary<string, object> Values { get; set; }
}
}

View File

@ -27,7 +27,10 @@ namespace Microsoft.AspNet.Abstractions
public async Task Invoke(HttpContext httpContext)
{
var context = new RouteContext(httpContext);
var context = new RouteContext(httpContext)
{
Router = Route,
};
await Route.RouteAsync(context);
if (!context.IsHandled)