Beispiel #1
0
        private static void ProcessActionParam(HttpParameterDescriptor param, HttpRouteData routeDataValues, Dictionary<string, string> result)
        {
            var propertyReader = new PropertyReader();

            if (propertyReader.IsSimpleType(param.ParameterType))
            {
                var paramName = param.ParameterName;
                AddParamWithRouteValue(paramName, routeDataValues.Values, result);
            }
            else
            {
                var fieldNames = propertyReader.SimplePropertyNames(param.ParameterType);
                foreach (var fieldName in fieldNames)
                {
                    AddParamWithRouteValue(fieldName.ToLowerInvariant(), routeDataValues.Values, result);
                }
            }
        }