Esempio n. 1
0
 public ImmutableBidirectionalDictionary <TFirst, TSecond> Add(TFirst first, TSecond second)
 => new ImmutableBidirectionalDictionary <TFirst, TSecond> (
     FirstToSecond.Add(first, second),
     SecondToFirst.Add(second, first));
Esempio n. 2
0
 public bool TryGetSecond(TFirst first, out TSecond second)
 => FirstToSecond.TryGetValue(first, out second);
Esempio 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));