Add schema compare generate script operation (#787)

* add generate script operation
This commit is contained in:
kisantia
2019-03-29 14:12:37 -07:00
committed by GitHub
parent c0ec9272b3
commit 0c46c5bfdb
5 changed files with 423 additions and 85 deletions

View File

@@ -56,16 +56,9 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
/// </summary>
public string ErrorMessage { get; set; }
/// <summary>
/// Cancel operation
/// </summary>
// The schema compare public api doesn't currently take a cancellation token so the operation can't be cancelled
public void Cancel()
{
if (!this.cancellation.IsCancellationRequested)
{
Logger.Write(TraceEventType.Verbose, string.Format("Cancel invoked for OperationId {0}", this.OperationId));
this.cancellation.Cancel();
}
}
/// <summary>
@@ -110,7 +103,8 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
}
catch (Exception e)
{
Logger.Write(TraceEventType.Error, string.Format("Schema compare operation {0} failed with exception {1}", this.OperationId, e));
ErrorMessage = e.Message;
Logger.Write(TraceEventType.Error, string.Format("Schema compare operation {0} failed with exception {1}", this.OperationId, e.Message));
throw;
}
}