BlueCollar.Dashboard.DashboardRouter.GetRoute C# (CSharp) Метод

GetRoute() публичный статический Метод

Gets the IDashboardRoute matching the given verb and handler-relative URL.
public static GetRoute ( string verb, string handlerRelativeUrl ) : IDashboardRoute
verb string The verb to get the route for.
handlerRelativeUrl string The handler-relative URL to get the verb for.
Результат IDashboardRoute
        public static IDashboardRoute GetRoute(string verb, string handlerRelativeUrl)
        {
            verb = NormalizeVerb(verb);
            string path = NormalizeHandlerRelativeUrl(handlerRelativeUrl);

            foreach (IDashboardRoute route in Routes)
            {
                if (route.IsMatch(verb, path))
                {
                    return route;
                }
            }

            return null;
        }