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: Hey Dusan, We implemented it this way on purpose for WebAPI, as we didn't think there is a scenario where you actually want to use them. This class is only used for generating URLs and not for anything else. In the MVC case this is just a side effect of the fact that we derive from Route, and it's not 100% intentional. Can you please come up with the use case/scenario where you actually need these values to be returned? Thanks, Yishai
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: Hey Dusan, We implemented it this way on purpose for WebAPI, as we didn't think there is a scenario where you actually want to use them. This class is only used for generating URLs and not for anything else. In the MVC case this is just a side effect of the fact that we derive from Route, and it's not 100% intentional. Can you please come up with the use case/scenario where you actually need these values to be returned? Thanks, Yishai