Stubbing out query execution settings

Adding a setting for batch separator.
Very small refactor to WorkspaceService that will create the basic
settings upon construction of the object.
This commit is contained in:
benrr101
2016-08-17 18:24:20 -07:00
parent e9814435d8
commit dee490341d
4 changed files with 48 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.SqlTools.ServiceLayer.SqlContext
{
public class QueryExecutionSettings
{
private const string DefaultBatchSeparator = "GO";
private string batchSeparator;
public string BatchSeparator
{
get { return batchSeparator ?? DefaultBatchSeparator; }
set { batchSeparator = value; }
}
/// <summary>
/// Update the current settings with the new settings
/// </summary>
/// <param name="newSettings">The new settings</param>
public void Update(QueryExecutionSettings newSettings)
{
BatchSeparator = newSettings.BatchSeparator;
}
}
}