23 using System.Collections.Generic;
25 using System.Runtime.Serialization;
28 namespace Lucene.Net.Util
40 public class IdentityDictionary<TKey, TValue> : Dictionary<TKey, TValue>
42 public IdentityDictionary(IDictionary<TKey, TValue> other) : base(other, new IdentityComparer())
45 public IdentityDictionary(
int capacity) : base(capacity, new IdentityComparer())
48 public IdentityDictionary() : this(16)
51 class IdentityComparer : IEqualityComparer<TKey>
53 public bool Equals(TKey x, TKey y)
55 return ReferenceEquals(x, y);
58 public int GetHashCode(TKey obj)
60 return obj.GetHashCode();