Hi,
I'm the author of AttributeRouting, an open-source project that lets users specify routes using attributes in Mvc, Http.WebHost, and Http.SelfHost scenarios. When generating route for Http.WebHost scenarios, I need to register a custom Route object derived from System.Web.Http.WebHost.Routing.HostedHttpRoute. Currently this object is marked internal, making it impossible to simply hook into the underlying framework.
By contrast, both System.Web.Routing.Route (used by Mvc) and System.Web.Http.Routing.HttpRoute (used by Http.SelfHost) are public and allow me to hook directly into the underlying routing framework.
Cheers,
Tim McCall
Comments: So on further inspection, and having looked at RC, I noticed that System.Web.Http.RouteCollectionExtensions adds an HttpWebRoute to the route collection (I was mistaken in referencing HostedHttpRoute). AR used this class, the HttpWebRoute, for RC support, when it was marked public. But now, of course, I cannot simply piggyback on it because its accessibility has been changed to internal. Simple enough to reverse engineer, but I am still curious about why it was changed from public to internal. Thanks, Tim
I'm the author of AttributeRouting, an open-source project that lets users specify routes using attributes in Mvc, Http.WebHost, and Http.SelfHost scenarios. When generating route for Http.WebHost scenarios, I need to register a custom Route object derived from System.Web.Http.WebHost.Routing.HostedHttpRoute. Currently this object is marked internal, making it impossible to simply hook into the underlying framework.
By contrast, both System.Web.Routing.Route (used by Mvc) and System.Web.Http.Routing.HttpRoute (used by Http.SelfHost) are public and allow me to hook directly into the underlying routing framework.
Cheers,
Tim McCall
Comments: So on further inspection, and having looked at RC, I noticed that System.Web.Http.RouteCollectionExtensions adds an HttpWebRoute to the route collection (I was mistaken in referencing HostedHttpRoute). AR used this class, the HttpWebRoute, for RC support, when it was marked public. But now, of course, I cannot simply piggyback on it because its accessibility has been changed to internal. Simple enough to reverse engineer, but I am still curious about why it was changed from public to internal. Thanks, Tim