mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
* Moving Migration service to its own project * Adding loc files to the project * Adding Migration to build * Adding Migration Integration Tests * Trying loops * Fixing params * Fixing indent * Cleaning up yaml * Getting command line arg for auto flush log * Adding tde service
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
//
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
//
|
|
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Microsoft.SqlServer.DataCollection.Common.Contracts.OperationsInfrastructure;
|
|
|
|
namespace Microsoft.SqlTools.Migration.Utils
|
|
{
|
|
internal static class ExtensionMethods
|
|
{
|
|
public static void AddExceptions(this IDictionary<string, IEnumerable<ReportableException>> exceptionMap1, IDictionary<string, IEnumerable<ReportableException>> exceptionMap2)
|
|
{
|
|
foreach (var keyValuePair2 in exceptionMap2)
|
|
{
|
|
// If the dictionary already contains the key then merge them
|
|
if (exceptionMap1.ContainsKey(keyValuePair2.Key))
|
|
{
|
|
foreach (var value in keyValuePair2.Value)
|
|
{
|
|
exceptionMap1[keyValuePair2.Key].Append(value);
|
|
}
|
|
continue;
|
|
}
|
|
exceptionMap1.Add(keyValuePair2);
|
|
}
|
|
}
|
|
}
|
|
}
|