public Endpoint GetEndpointByName(string name)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                if (_configuration.HomeEndpoint != null)
                {
                    return(_otherStore.GetEndpointByType(_configuration.HomeEndpoint));
                }

                return(_otherStore.GetEndpointByName("Home"));
            }

            return(_otherStore.GetEndpointByName(name));
        }
Exemple #2
0
        public IEndpointAction GetAction(RouteData route)
        {
            var endpoint = _endpoints.GetEndpointByName(route.Endpoint);

            if (endpoint == null)
            {
                return(null);                //return 404 action?
            }

            var action = endpoint.GetAction(route.Method, route.Action);

            if (action == null)
            {
                return(null);                //return 404 action?
            }

            return(action);
        }