Example #1
0
 public bool Equals(NullableKey <TKey> x, NullableKey <TKey> y)
 {
     return((comparer != null)
         ? comparer.Equals(x.Value, y.Value)
         : object.Equals(x.Value, y.Value));
 }
Example #2
0
 public int GetHashCode(NullableKey <TKey> obj)
 {
     return((comparer != null)
         ? comparer.GetHashCode(obj.Value)
         : (obj != null && obj.Value != null) ? obj.Value.GetHashCode() + 1 : 0);
 }
Example #3
0
 public TValue this[TKey key] {
     get { return(dict[NullableKey.Create(key)]); } set { dict[NullableKey.Create(key)] = value; }
 }
Example #4
0
 public bool TryGetValue(TKey key, out TValue value)
 {
     return(dict.TryGetValue(NullableKey.Create(key), out value));
 }
Example #5
0
 public bool Remove(TKey key)
 {
     return(dict.Remove(NullableKey.Create(key)));
 }
Example #6
0
 public bool ContainsKey(TKey key)
 {
     return(dict.ContainsKey(NullableKey.Create(key)));
 }
Example #7
0
 public void Add(TKey key, TValue value)
 {
     dict.Add(NullableKey.Create(key), value);
 }