Expose parsed route so that observers can get extra details about the route (i.e. optional state)

This commit is contained in:
Anthony van der Hoorn 2015-09-23 09:00:28 -07:00
parent 61831527f8
commit 59b698c8b2
3 changed files with 8 additions and 2 deletions

View File

@ -37,9 +37,9 @@ namespace Microsoft.AspNet.Routing.Template
}
}
public List<TemplatePart> Parameters { get; private set; }
public IList<TemplatePart> Parameters { get; private set; }
public List<TemplateSegment> Segments { get; private set; }
public IList<TemplateSegment> Segments { get; private set; }
private string DebuggerToString()
{

View File

@ -91,6 +91,11 @@ namespace Microsoft.AspNet.Routing.Template
get { return _dataTokens; }
}
public RouteTemplate ParsedTemplate
{
get { return _parsedTemplate; }
}
public string RouteTemplate
{
get { return _routeTemplate; }

View File

@ -8,6 +8,7 @@ using Microsoft.AspNet.Routing.Template;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.OptionsModel;
using Xunit;
using System.Linq;
namespace Microsoft.AspNet.Routing.Tests
{