Hi,
properties (_RouteTemplate_, _Defaults_, _Constraints_, _DataTokens_ and _Handler_) of the __GenerationRoute__ from System.Web.Http.Routing should return the same values as innerRoute. The __GenerationRoute__ from System.Web.Mvc.Routing works as expected.
Can you fix it?
Thank you!
Dusan
Comments: Hi Dusan, We're considering the change you proposed for an upcoming release. In the mean time there's another way to get at this data. In the route collection there will be one route that implements IReadOnlyCollection<RouteBase> (MVC) or IReadOnlyCollection<IHttpRoute> (WebAPI). The elements of this collection will be the same route objects that are wrapped by GenerationRoute. This is a better data source for what you're doing, because in WebAPI routes without a name won't be wrapped by a GenerationRoute. Note that this is an implementation detail of the framework, and we can't guarantee that it will stay the same forever. If you want to give us more details about what you're trying to do we can look at providing a better way to get this information in the future.
properties (_RouteTemplate_, _Defaults_, _Constraints_, _DataTokens_ and _Handler_) of the __GenerationRoute__ from System.Web.Http.Routing should return the same values as innerRoute. The __GenerationRoute__ from System.Web.Mvc.Routing works as expected.
Can you fix it?
Thank you!
Dusan
Comments: Hi Dusan, We're considering the change you proposed for an upcoming release. In the mean time there's another way to get at this data. In the route collection there will be one route that implements IReadOnlyCollection<RouteBase> (MVC) or IReadOnlyCollection<IHttpRoute> (WebAPI). The elements of this collection will be the same route objects that are wrapped by GenerationRoute. This is a better data source for what you're doing, because in WebAPI routes without a name won't be wrapped by a GenerationRoute. Note that this is an implementation detail of the framework, and we can't guarantee that it will stay the same forever. If you want to give us more details about what you're trying to do we can look at providing a better way to get this information in the future.