ServiceStack.HttpRequestExtensions.GetFlattenedRequestParams C# (CSharp) Method

GetFlattenedRequestParams() public static method

Duplicate params have their values joined together in a comma-delimited string
public static GetFlattenedRequestParams ( this request ) : string>.Dictionary
request this
return string>.Dictionary
        public static Dictionary<string, string> GetFlattenedRequestParams(this IRequest request)
        {
            var map = new Dictionary<string, string>();

            foreach (var name in request.QueryString.AllKeys)
            {
                if (name == null) continue; //thank you ASP.NET
                map[name] = request.QueryString[name];
            }

            if ((request.Verb == HttpMethods.Post || request.Verb == HttpMethods.Put)
                && request.FormData != null)
            {
                foreach (var name in request.FormData.AllKeys)
                {
                    if (name == null) continue; //thank you ASP.NET
                    map[name] = request.FormData[name];
                }
            }

            return map;
        }