Skip to content

Commit

Permalink
Remove ContentDictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-strecker-sonarsource committed Mar 31, 2023
1 parent 6664bf6 commit 8567e1c
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,22 +230,5 @@ private void SetCachedHashCodeField<T>(T value, ref T backingField, ref int? bac
hashCode = null;
}
}

private struct ContentImmutableDictionary<TKey, TValue> : IEquatable<ContentImmutableDictionary<TKey, TValue>>
{
private readonly ImmutableDictionary<TKey, TValue> dictionary;
private int? hashCode;

public ContentImmutableDictionary(ImmutableDictionary<TKey, TValue> dictionary)
{
this.dictionary = dictionary;
}

public bool Equals(ContentImmutableDictionary<TKey, TValue> other) =>
dictionary.DictionaryEquals(other.dictionary);

public override int GetHashCode() =>
hashCode ??= HashCode.DictionaryContentHash(dictionary);
}
}
}

0 comments on commit 8567e1c

Please sign in to comment.