ALE.Http.Route.Route C# (CSharp) Method

Route() public method

public Route ( string path, string methodName, Type controllerType ) : System
path string
methodName string
controllerType System.Type
return System
        public Route(string path, string methodName, Type controllerType)
        {
            if (String.IsNullOrWhiteSpace(path)) throw new ArgumentNullException("path");
            if (String.IsNullOrWhiteSpace(methodName)) throw new ArgumentNullException("methodName");
            Path = path;
            Parameters = GetParameters(path);
            PathTester = CreatePathTester(path);
            ControllerType = controllerType;
            HandlerInfo = controllerType.GetMethod(methodName);
            HandlerParameters = HandlerInfo.GetParameters().ToDictionary(x => x.Name, x => x);
            if (HandlerParameters.Count == 0 || HandlerParameters.First().Value.ParameterType != typeof(Action))
            {
                throw new InvalidOperationException("First argument of a route must be the 'next' delegate.");
            }
        }