mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-21 09:35:39 -05:00
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
This commit is contained in:
31
src/Microsoft.SqlTools.Migration/Utils/ExtensionMethods.cs
Normal file
31
src/Microsoft.SqlTools.Migration/Utils/ExtensionMethods.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user