aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Net/CollectionExtensions.cs
blob: 137fbe50b7452d9e7875a9ad5b3f9db1a32b3694 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;

namespace MediaBrowser.Controller.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);
        }
    }
}