Files
YABA/API/YABA.Common/Extensions/DictionaryExtensions.cs
Carl Tibule 9bbd12e4c3
All checks were successful
ci/woodpecker/tag/api_build Pipeline was successful
ci/woodpecker/tag/api_uploadimage Pipeline was successful
ci/woodpecker/tag/web_uploadimage Pipeline was successful
Created Woodpecker CI/CD deployment
- Created Dockerfile for packing up API and Web projects as Docker image
2024-04-05 23:36:49 -05:00

25 lines
617 B
C#

using System;
using System.Collections.Generic;
namespace YABA.Common.Extensions
{
public static class DictionaryExtensions
{
public static void AddRange<K, V>(this Dictionary<K, V> source, Dictionary<K, V> collection)
{
if (collection == null)
{
throw new ArgumentNullException("Collection is null");
}
foreach (var item in collection)
{
if (!source.ContainsKey(item.Key))
{
source.Add(item.Key, item.Value);
}
}
}
}
}