1
#if !SILVERLIGHT && !MONOTOUCH && !XBOX
3
using System.Collections.Generic;
4
using System.Collections.Specialized;
6
namespace ServiceStack.ServiceModel.Extensions
8
public static class DictionaryExtensions
10
public static Dictionary<string, string> ToDictionary(this NameValueCollection nameValues)
12
var map = new Dictionary<string, string>();
13
foreach (var key in nameValues.AllKeys)
17
//occurs when no value is specified, e.g. 'path/to/page?debug'
18
//throw new ArgumentNullException("key", "nameValues: " + nameValues);
22
var values = nameValues.GetValues(key);
23
if (values != null && values.Length > 0)
b'\\ No newline at end of file'