mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
DictionaryExt.Add many
This commit is contained in:
parent
a140b1daca
commit
820e2abf41
@ -18,5 +18,21 @@ namespace Wabbajack
|
||||
dict[key] = ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void Add<K, V>(this IDictionary<K, V> dict, IEnumerable<KeyValuePair<K, V>> vals)
|
||||
{
|
||||
foreach (var val in vals)
|
||||
{
|
||||
dict.Add(val);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Set<K, V>(this IDictionary<K, V> dict, IEnumerable<KeyValuePair<K, V>> vals)
|
||||
{
|
||||
foreach (var val in vals)
|
||||
{
|
||||
dict[val.Key] = val.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user