Multi-Platform Package Manager for Stable Diffusion
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
491 B

namespace StabilityMatrix.Core.Extensions;
public static class DictionaryExtensions
{
/// <summary>
/// Adds all items from another dictionary to this dictionary.
/// </summary>
public static void Update<TKey, TValue>(
this Dictionary<TKey, TValue> source,
IReadOnlyDictionary<TKey, TValue> collection
)
where TKey : notnull
{
foreach (var item in collection)
{
source[item.Key] = item.Value;
}
}
}