Files
sqltoolsservice/src/Microsoft.SqlTools.Migration/Utils/ExtensionMethods.cs
Aasim Khan ab5a1e6c85 Separating Migration into its own project (#1828)
* 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
2023-01-30 10:30:28 -08:00

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);
}
}
}
}