aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/IO/SharpCifs/Util/Sharpen/Hashtable.cs
blob: 86c54265c65ec308cae991c999a0fc5c30dce5ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System.Collections.Generic;
using System.Linq;

namespace SharpCifs.Util.Sharpen
{
    public class Hashtable : Dictionary<object, object>
    {
        public void Put(object key, object value)
        {
            if (this.ContainsKey(key))
                this[key] = value;
            else
                this.Add(key, value);
        }

        public object Get(object key)
        {
            return this.ContainsKey(key) 
                ? this[key] 
                : null;
        }
    }
}