35 lines
700 B
C#
35 lines
700 B
C#
using System.Collections.Generic;
|
|
|
|
namespace DanieleMarotta.RiversongCodeShowcase
|
|
{
|
|
public interface IMultiDictionary<K, V, C> : IEnumerable<KeyValuePair<K, V>> where C : ICollection<V>
|
|
{
|
|
C this[K key] { get; }
|
|
|
|
Dictionary<K, C>.KeyCollection Keys { get; }
|
|
|
|
int KeyCount { get; }
|
|
|
|
int ValueCount { get; }
|
|
|
|
int Count(K key);
|
|
|
|
bool Add(K key, V value);
|
|
|
|
bool Remove(K key, V value);
|
|
|
|
bool Remove(V value);
|
|
|
|
void Clear(K key);
|
|
|
|
void Clear();
|
|
|
|
bool ContainsKey(K key);
|
|
|
|
bool ContainsValue(K key, V value);
|
|
|
|
bool ContainsValue(V value);
|
|
|
|
bool TryGetValues(K key, out C values);
|
|
}
|
|
} |