Model view controller 如何获取所有已注册路由的列表

Model view controller 如何获取所有已注册路由的列表,model-view-controller,routing,Model View Controller,Routing,我正在创建RouteLink扩展方法,为此,我需要知道应用程序中所有已注册的路由,我将在其中选择正确的路由名称。如何从HtmlHelper扩展方法访问rotetable?有一个静态RouteCollection,其中存储了所有已注册的路由 System.Web.Routing.RouteTable.Routes

我正在创建RouteLink扩展方法,为此,我需要知道应用程序中所有已注册的路由,我将在其中选择正确的路由名称。如何从HtmlHelper扩展方法访问rotetable?

有一个静态RouteCollection,其中存储了所有已注册的路由

System.Web.Routing.RouteTable.Routes