4094 Kusto AAD Authentication Refactor (#1115)

* 4094 Upgraded Kusto.Data and Kusto.Language to 9.0.3. Refactored KustoServiceLayer to use KustoConnectionStringBuilder instead of Sql.

* 4094 Refactored KustoClient>Initialize to take connectionString as optional. Removed unused properties from ConnectionService>ParseConnectionString

* 4094 Updated Kusto.Data and Kusto.Language nuget packages to 9.0.4. Removed IsDedicatedAdminConnection function in ConnectionService.

* 4094 Fixed unit tests
This commit is contained in:
Justin M
2020-11-20 11:54:40 -08:00
committed by GitHub
parent 67c7e20c13
commit fd84367008
13 changed files with 65 additions and 301 deletions

View File

@@ -14,6 +14,7 @@ using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.SqlScriptPublish;
using Microsoft.SqlServer.Management.Sdk.Sfc;
using System.Diagnostics;
using Kusto.Data;
namespace Microsoft.Kusto.ServiceLayer.Scripting
{
@@ -157,7 +158,7 @@ namespace Microsoft.Kusto.ServiceLayer.Scripting
IEnumerable<ScriptingObject> selectedObjects = new List<ScriptingObject>(this.Parameters.ScriptingObjects);
_serverName = dataSource.ClusterName;
_databaseName = new SqlConnectionStringBuilder(this.Parameters.ConnectionString).InitialCatalog;
_databaseName = new KustoConnectionStringBuilder(this.Parameters.ConnectionString).InitialCatalog;
UrnCollection urnCollection = new UrnCollection();
foreach (var scriptingObject in selectedObjects)
{

View File

@@ -5,19 +5,11 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.SqlServer.Management.Sdk.Sfc;
using Microsoft.SqlServer.Management.SqlScriptPublish;
using Microsoft.SqlTools.Hosting.Protocol;
using Microsoft.Kusto.ServiceLayer.Scripting.Contracts;
using Microsoft.SqlTools.Utility;
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using System.Diagnostics;
using Kusto.Data;
namespace Microsoft.Kusto.ServiceLayer.Scripting
{
@@ -111,7 +103,7 @@ namespace Microsoft.Kusto.ServiceLayer.Scripting
{
try
{
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(this.Parameters.ConnectionString);
var builder = new KustoConnectionStringBuilder(this.Parameters.ConnectionString);
}
catch (Exception e)
{

View File

@@ -5,9 +5,9 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Linq;
using Kusto.Data;
using Microsoft.Kusto.ServiceLayer.DataSource;
using Microsoft.SqlServer.Management.SqlScriptPublish;
using Microsoft.Kusto.ServiceLayer.Scripting.Contracts;
@@ -202,7 +202,7 @@ namespace Microsoft.Kusto.ServiceLayer.Scripting
string.Join(", ", selectedObjects)));
string server = GetServerNameFromLiveInstance();
string database = new SqlConnectionStringBuilder(this.Parameters.ConnectionString).InitialCatalog;
string database = new KustoConnectionStringBuilder(this.Parameters.ConnectionString).InitialCatalog;
foreach (ScriptingObject scriptingObject in selectedObjects)
{

View File

@@ -7,10 +7,10 @@ using Microsoft.Kusto.ServiceLayer.Scripting.Contracts;
using Microsoft.Kusto.ServiceLayer.DataSource;
using Microsoft.SqlTools.Utility;
using System;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using Kusto.Data;
using static Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptOptions;
namespace Microsoft.Kusto.ServiceLayer.Scripting
@@ -82,7 +82,7 @@ namespace Microsoft.Kusto.ServiceLayer.Scripting
{
try
{
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(this.Parameters.ConnectionString);
var builder = new KustoConnectionStringBuilder(this.Parameters.ConnectionString);
}
catch (Exception e)
{