wasSharp

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 53  →  ?path2? @ 54
/Collections/Utilities/CollectionExtensions.cs
@@ -26,8 +26,8 @@
IDictionary<TKey, TValue> otherDictionary)
{
return
(dictionary ?? new Dictionary<TKey, TValue>()).Count.Equals(
(otherDictionary ?? new Dictionary<TKey, TValue>()).Count) &&
(dictionary ?? new Dictionary<TKey, TValue>()).Count().Equals(
(otherDictionary ?? new Dictionary<TKey, TValue>()).Count()) &&
(otherDictionary ?? new Dictionary<TKey, TValue>())
.OrderBy(kvp => kvp.Key)
.SequenceEqual((dictionary ?? new Dictionary<TKey, TValue>())
@@ -59,10 +59,10 @@
}
}
 
public static MultiKeyDictionary<K1, K2, V> ToMultiKeyDictionary<S, K1, K2, V>(this IEnumerable<S> items,
public static ConcurrentMultiKeyDictionary<K1, K2, V> ToMultiKeyDictionary<S, K1, K2, V>(this IEnumerable<S> items,
Func<S, K1> key1, Func<S, K2> key2, Func<S, V> value)
{
var dict = new MultiKeyDictionary<K1, K2, V>();
var dict = new ConcurrentMultiKeyDictionary<K1, K2, V>();
foreach (var i in items)
{
dict.Add(key1(i), key2(i), value(i));