Merge branch 'master' into dev

This commit is contained in:
Karl Burtram
2016-11-28 09:58:32 -08:00
12 changed files with 994 additions and 6 deletions

View File

@@ -183,6 +183,10 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
// create a sql connection instance
connectionInfo.SqlConnection = connectionInfo.Factory.CreateSqlConnection(connectionString);
// turning on MARS to avoid break in LanguageService with multiple editors
// we'll remove this once ConnectionService is refactored to not own the LanguageService connection
connectionInfo.ConnectionDetails.MultipleActiveResultSets = true;
// Add a cancellation token source so that the connection OpenAsync() can be cancelled
using (source = new CancellationTokenSource())
{

View File

@@ -633,7 +633,6 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
}
}
/// <summary>
/// Converts a SQL Parser QuickInfo object into a VS Code Hover object
/// </summary>

View File

@@ -253,7 +253,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
await Task.FromResult(true);
}
else
{
{
// get the current list of completion items and return to client
var scriptFile = LanguageService.WorkspaceServiceInstance.Workspace.GetFile(
textDocumentPosition.TextDocument.Uri);

View File

@@ -99,6 +99,12 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
/// </summary>
public event Batch.BatchAsyncEventHandler BatchCompleted;
/// <summary>
/// Delegate type for callback when a query connection fails
/// </summary>
/// <param name="q">The query that completed</param>
public delegate Task QueryAsyncErrorEventHandler(string message);
/// <summary>
/// Callback for when the query has completed successfully
/// </summary>

View File

@@ -437,6 +437,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
};
await requestContext.SendEvent(QueryExecuteCompleteEvent.Type, eventParams);
};
query.QueryCompleted += callback;
query.QueryFailed += callback;
query.QueryConnectionException += errorCallback;

View File

@@ -397,7 +397,7 @@ namespace Microsoft.SqlTools.ServiceLayer
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Keys
{
static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.ServiceLayer.SR", typeof(SR).GetTypeInfo().Assembly);
static ResourceManager resourceManager = new ResourceManager(typeof(SR));
static CultureInfo _culture = null;