blob: c807dbb937fb86dbc439a4a58d31f0e2b55900ce (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
using System.Collections.Generic;
using System.Linq;
namespace IRCStates
{
public static class Extensions
{
public static void UpdateWith<TKey, TValue>(this Dictionary<TKey, TValue> dict, Dictionary<TKey, TValue> other)
{
if (dict == null || other == null || !other.Any()) return;
foreach (var (key, value) in other) dict[key] = value;
}
}
}
|