public static void ForEach <T, K>(this UnOrderMultiMap <T, K> multiMap, Action <T, List <K> > action) { foreach (var kv in multiMap) { action(kv.Key, kv.Value); } }
public static void ForEachFunc <T, K>(this UnOrderMultiMap <T, K> multiMap, Func <T, List <K>, bool> func) { foreach (var kv in multiMap) { if (!func(kv.Key, kv.Value)) { break; } } }