mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 17:23:55 -05:00
* Make nullable warnings a per file opt-in * Remove unneeded compiler directives * Remove compiler directive for User Data
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
//
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
//
|
|
|
|
#nullable disable
|
|
using System.Threading;
|
|
using Microsoft.SqlServer.Dac.Compare;
|
|
using Microsoft.SqlTools.ServiceLayer.TaskServices;
|
|
using Microsoft.SqlTools.Utility;
|
|
|
|
namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
|
|
{
|
|
abstract class SchemaComparePublishChangesOperation : ITaskOperation
|
|
{
|
|
public string OperationId { get; private set; }
|
|
|
|
public SqlTask SqlTask { get; set; }
|
|
|
|
public SchemaComparisonResult ComparisonResult { get; set; }
|
|
|
|
public string ErrorMessage { get; set; }
|
|
|
|
protected CancellationToken CancellationToken { get { return cancellation.Token; } }
|
|
|
|
protected readonly CancellationTokenSource cancellation = new();
|
|
|
|
public SchemaComparePublishChangesOperation(SchemaComparisonResult comparisonResult)
|
|
{
|
|
Validate.IsNotNull(nameof(comparisonResult), comparisonResult);
|
|
ComparisonResult = comparisonResult;
|
|
}
|
|
|
|
public abstract void Execute(TaskExecutionMode mode);
|
|
|
|
public void Cancel()
|
|
{
|
|
cancellation.Cancel();
|
|
}
|
|
}
|
|
}
|