PortablePrism.Portable by Andrii Chebukin

<PackageReference Include="PortablePrism.Portable" Version="1.0.1" />

 ListDictionary<TKey, TValue>

public sealed class ListDictionary<TKey, TValue> : IDictionary<TKey, IList<TValue>>, ICollection<KeyValuePair<TKey, IList<TValue>>>, IEnumerable<KeyValuePair<TKey, IList<TValue>>>, IEnumerable
A dictionary of lists.
public int Count { get; }

Gets the number of lists in the dictionary.

public IList<TValue> this[TKey key] { get; set; }

Gets or sets the list associated with the given key. The access always succeeds, eventually returning an empty list.

public ICollection<TKey> Keys { get; }

Gets the list of keys in the dictionary.

public IList<TValue> Values { get; }

Gets a shallow copy of all values in all lists.

public ListDictionary()

public void Add(TKey key)

If a list does not already exist, it will be created automatically.

public void Add(TKey key, TValue value)

Adds a value to a list with the given key. If a list does not already exist, it will be created automatically.

public void Clear()

Removes all entries in the dictionary.

public bool ContainsKey(TKey key)

Determines whether the dictionary contains the given key.

public bool ContainsValue(TValue value)

Determines whether the dictionary contains the specified value.

public IEnumerable<TValue> FindAllValues(Predicate<TValue> valueFilter)

Retrieves all the elements that match the condition defined by the specified predicate.

public IEnumerable<TValue> FindAllValuesByKey(Predicate<TKey> keyFilter)

Retrieves the all the elements from the list which have a key that matches the condition defined by the specified predicate.

public bool Remove(TKey key)

Removes a list by key.

public void Remove(TKey key, TValue value)

Removes a value from the list with the given key.

public void Remove(TValue value)

Removes a value from all lists where it may be found.