Created Woodpecker CI/CD deployment
- Created Dockerfile for packing up API and Web projects as Docker image
This commit is contained in:
24
API/YABA.Common/Extensions/DictionaryExtensions.cs
Normal file
24
API/YABA.Common/Extensions/DictionaryExtensions.cs
Normal file
@ -0,0 +1,24 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user