/// <summary> /// Gets the virtual path for the route specified by the values in <paramref name="routeValues" />. /// </summary> /// <param name="routeValues">The route values dictionary.</param> /// <returns> /// The virtual path for the route. /// </returns> /// <exception cref="System.ArgumentNullException"></exception> public string GetVirtualPath(RouteValueDictionary routeValues) { if (routeValues == null) { throw new ArgumentNullException("routeValues"); } return(RouteTable.Routes.GetVirtualPath(new RequestContext(_contextProvider.GetHttpContextBase(), new RouteData()), routeValues).VirtualPath); }