ServiceStack.RestRoute.RestRoute C# (CSharp) Method

RestRoute() public method

public RestRoute ( Type type, string path, string verbs, int priority ) : System.Reflection
type System.Type
path string
verbs string
priority int
return System.Reflection
        public RestRoute(Type type, string path, string verbs, int priority)
        {
            this.HttpMethods = (verbs ?? Empty).Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
            this.Type = type;
            this.Path = path;
            this.Priority = priority;

            this.queryProperties = GetQueryProperties(type);
            foreach (var variableName in GetUrlVariables(path))
            {
                var safeVarName = variableName.TrimEnd('*');

                RouteMember propertyInfo;
                if (!this.queryProperties.TryGetValue(safeVarName, out propertyInfo))
                {
                    this.AppendError($"Variable '{variableName}' does not match any property.");
                    continue;
                }

                this.queryProperties.Remove(safeVarName);
                this.variablesMap[variableName] = propertyInfo;
            }
        }