aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Net/CollectionExtensions.cs
blob: 98d24dfc0456dd1e8439aefdede1d17250ec462a (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.Common.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);
        }
    }
}