Passing route collection through the context - for MVC to get access to it.
This commit is contained in:
parent
da057820e5
commit
6a309f20d8
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue