aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Net/CollectionExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Net/CollectionExtensions.cs')
-rw-r--r--MediaBrowser.Net/CollectionExtensions.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.Net/CollectionExtensions.cs b/MediaBrowser.Net/CollectionExtensions.cs
new file mode 100644
index 000000000..a6b59904f
--- /dev/null
+++ b/MediaBrowser.Net/CollectionExtensions.cs
@@ -0,0 +1,14 @@
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Linq;
+
+namespace MediaBrowser.Net
+{
+ public static class CollectionExtensions
+ {
+ public static IDictionary<string, IEnumerable<string>> ToDictionary(this NameValueCollection source)
+ {
+ return source.AllKeys.ToDictionary<string, string, IEnumerable<string>>(key => key, source.GetValues);
+ }
+ }
+} \ No newline at end of file