mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-09 17:52:35 -05:00
Switching from ISqlConnection to DbConnection
This is a fairly minor change that will save tons of time as we develop this service. The DbConnection and associated Db* abstract classes ask for synchronous versions of the code and allow the addition of async code. The SqlClient implementation already implements Db* abstract classes, so we can piggy back off that for our dependency injection layer. Tests and existing code has been updated to handle the change, as well
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.SqlTools.EditorServices.Utility;
|
||||
@@ -309,7 +310,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
||||
/// Callback for when a user connection is done processing
|
||||
/// </summary>
|
||||
/// <param name="sqlConnection"></param>
|
||||
public async Task OnConnection(ISqlConnection sqlConnection)
|
||||
public async Task OnConnection(DbConnection sqlConnection)
|
||||
{
|
||||
await AutoCompleteService.Instance.UpdateAutoCompleteCache(sqlConnection);
|
||||
await Task.FromResult(true);
|
||||
|
||||
Reference in New Issue
Block a user