Exemplo n.º 1
0
 public ImmutableBidirectionalDictionary <TFirst, TSecond> Add(TFirst first, TSecond second)
 => new ImmutableBidirectionalDictionary <TFirst, TSecond> (
     FirstToSecond.Add(first, second),
     SecondToFirst.Add(second, first));
Exemplo n.º 2
0
 public bool TryGetSecond(TFirst first, out TSecond second)
 => FirstToSecond.TryGetValue(first, out second);
Exemplo n.º 3
0
 public ImmutableBidirectionalDictionary <TFirst, TSecond> WithComparers(
     IEqualityComparer <TFirst> firstKeyComparer,
     IEqualityComparer <TSecond> secondKeyComparer)
 => new ImmutableBidirectionalDictionary <TFirst, TSecond> (
     FirstToSecond.WithComparers(firstKeyComparer, secondKeyComparer),
     SecondToFirst.WithComparers(secondKeyComparer, firstKeyComparer));