Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Value/DictionaryByValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Value.Shared
/// <remarks>This type is not thread-safe (for hashcode updates).</remarks>
/// <typeparam name="K">The type of keys in the dictionary.</typeparam>
/// <typeparam name="V">The type of values in the dictionary.</typeparam>
public class DictionaryByValue<K, V> : EquatableByValueWithoutOrder<DictionaryByValue<K, V>>, IDictionary<K, V>
public class DictionaryByValue<K, V> : EquatableByValueWithoutOrder<DictionaryByValue<K, V>>, IDictionary<K, V>, IReadOnlyDictionary<K, V>
{
private readonly IDictionary<K, V> dictionary;

Expand Down Expand Up @@ -132,5 +132,9 @@ public V this[K key]
public ICollection<K> Keys => dictionary.Keys;

public ICollection<V> Values => dictionary.Values;

IEnumerable<K> IReadOnlyDictionary<K, V>.Keys => dictionary.Keys;

IEnumerable<V> IReadOnlyDictionary<K, V>.Values => dictionary.Values;
}
}
2 changes: 1 addition & 1 deletion Value/ListByValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Value
/// </summary>
/// <remarks>This type is not thread-safe (for hashcode updates).</remarks>
/// <typeparam name="T">Type of the listed items.</typeparam>
public class ListByValue<T> : EquatableByValue<ListByValue<T>>, IList<T>
public class ListByValue<T> : EquatableByValue<ListByValue<T>>, IList<T>, IReadOnlyList<T>
{
private readonly IList<T> list;

Expand Down