public void Add_WithHostedHttpRoute_RegistersInnerRouteWithAspNetRouteCollection()
        {
            var route = new HostedHttpRoute("uri", null, null, null, null);

            _webApiRoutes.Add("name", route);

            var httpWebRoute = Assert.IsType<HttpWebRoute>(_aspNetRoutes["name"]);
            Assert.Same(route.OriginalRoute, httpWebRoute);
            Assert.Same(route, httpWebRoute.HttpRoute);
        }
        public HostedHttpVirtualPathData(VirtualPathData virtualPath)
        {
            if (virtualPath == null)
            {
                throw Error.ArgumentNull("route");
            }

            _virtualPath = virtualPath;
            _hostedHttpRoute = new HostedHttpRoute(_virtualPath.Route as Route);
        }
        public HostedHttpRouteData(RouteData routeData)
        {
            if (routeData == null)
            {
                throw Error.ArgumentNull("routeData");
            }

            _routeData = routeData;
            _hostedHttpRoute = new HostedHttpRoute(_routeData.Route as Route);
        }
        public override bool TryGetValue(string name, out IHttpRoute route)
        {
            Route rt = _routeCollection[name] as Route;
            if (rt != null)
            {
                route = new HostedHttpRoute(rt);
                return true;
            }

            route = null;
            return false;
        }