From 3e1f186891e20f987314db154b29a1d3f9fa50f3 Mon Sep 17 00:00:00 2001
From: udeeshagautam <46980425+udeeshagautam@users.noreply.github.com>
Date: Fri, 14 Jun 2019 18:19:36 -0700
Subject: [PATCH] Schema compare cancel operation (#826)
* First cut of schema compare cancel (private nuget)
* Update Dacfx nuget to a published version
---
.../Localization/sr.cs | 11 ++++
.../Localization/sr.resx | 3 ++
.../Localization/sr.strings | 3 +-
.../Localization/sr.xlf | 5 ++
.../Microsoft.SqlTools.ServiceLayer.csproj | 2 +-
.../SchemaCompareCancellationRequest.cs | 30 +++++++++++
.../SchemaCompareGenerateScriptOperation.cs | 3 +-
.../SchemaCompare/SchemaCompareOperation.cs | 27 +++++++---
.../SchemaComparePublishChangesOperation.cs | 3 +-
.../SchemaCompare/SchemaCompareService.cs | 39 ++++++++++++++
...ManagedBatchParser.IntegrationTests.csproj | 2 +-
...Tools.ServiceLayer.IntegrationTests.csproj | 2 +-
.../SchemaCompareServiceTests.cs | 51 ++++++++++++++++++-
13 files changed, 168 insertions(+), 13 deletions(-)
mode change 100755 => 100644 src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
mode change 100755 => 100644 src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
create mode 100644 src/Microsoft.SqlTools.ServiceLayer/SchemaCompare/Contracts/SchemaCompareCancellationRequest.cs
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
old mode 100755
new mode 100644
index ef2950c6..5b0a1bc5
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
@@ -2941,6 +2941,14 @@ namespace Microsoft.SqlTools.ServiceLayer
}
}
+ public static string SchemaCompareSessionNotFound
+ {
+ get
+ {
+ return Keys.GetString(Keys.SchemaCompareSessionNotFound);
+ }
+ }
+
public static string ConnectionServiceListDbErrorNotConnected(string uri)
{
return Keys.GetString(Keys.ConnectionServiceListDbErrorNotConnected, uri);
@@ -4281,6 +4289,9 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string OpenScmpConnectionBasedModelParsingError = "OpenScmpConnectionBasedModelParsingError";
+ public const string SchemaCompareSessionNotFound = "SchemaCompareSessionNotFound";
+
+
private Keys()
{ }
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
old mode 100755
new mode 100644
index e156dcce..d6dcd3d8
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
@@ -1723,4 +1723,7 @@
Error encountered while trying to parse connection information for endpoint '{0}' with error message '{1}'
+
+ Could not find the schema compare session to cancel
+
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
index 9b55edcd..3d397753 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
@@ -797,4 +797,5 @@ ExtractInvalidVersion = Invalid version '{0}' passed. Version must be in the for
# Schema Compare
PublishChangesTaskName = Apply schema compare changes
SchemaCompareExcludeIncludeNodeNotFound = Failed to find the specified change in the model
-OpenScmpConnectionBasedModelParsingError = Error encountered while trying to parse connection information for endpoint '{0}' with error message '{1}'
\ No newline at end of file
+OpenScmpConnectionBasedModelParsingError = Error encountered while trying to parse connection information for endpoint '{0}' with error message '{1}'
+SchemaCompareSessionNotFound = Could not find the schema compare session to cancel
\ No newline at end of file
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
index 524dc2d8..ca7e18d5 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
@@ -2001,6 +2001,11 @@
Error encountered while trying to parse connection information for endpoint '{0}' with error message '{1}'
+
+ Could not find the schema compare session to cancel
+ Could not find the schema compare session to cancel
+
+