Dictionary update extensions support kvps

This commit is contained in:
Chris Cameron
2018-02-25 18:02:41 -05:00
parent 4aea9f0a05
commit 219ea08f95

View File

@@ -193,7 +193,8 @@ namespace ICD.Common.Utils.Extensions
/// <param name="other"></param>
/// <returns></returns>
[PublicAPI]
public static bool Update<TKey, TValue>(this IDictionary<TKey, TValue> extends, IDictionary<TKey, TValue> other)
public static bool Update<TKey, TValue>(this IDictionary<TKey, TValue> extends,
IEnumerable<KeyValuePair<TKey, TValue>> other)
{
if (extends == null)
throw new ArgumentNullException("extends");
@@ -214,7 +215,8 @@ namespace ICD.Common.Utils.Extensions
/// <param name="comparer"></param>
/// <returns></returns>
[PublicAPI]
public static bool Update<TKey, TValue>(this IDictionary<TKey, TValue> extends, IDictionary<TKey, TValue> other,
public static bool Update<TKey, TValue>(this IDictionary<TKey, TValue> extends,
IEnumerable<KeyValuePair<TKey, TValue>> other,
IEqualityComparer<TValue> comparer)
{
if (extends == null)