Add support for Dedicated Administrator Connection (#466)

* Prototype support for admin connection

* Added test and used correct default for ADMIN connection casing
This commit is contained in:
Kevin Cunnane
2017-09-20 16:04:12 -07:00
committed by GitHub
parent 8867bd9059
commit 01d7cde0e3
3 changed files with 78 additions and 2 deletions

View File

@@ -834,6 +834,11 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
await Task.Run(() =>
{
if (ConnectionService.IsDedicatedAdminConnection(info.ConnectionDetails))
{
// Intellisense cannot be run on these connections as only 1 SqlConnection can be opened on them at a time
return;
}
ScriptParseInfo scriptInfo = GetScriptParseInfo(info.OwnerUri, createIfNotExists: true);
if (Monitor.TryEnter(scriptInfo.BuildingMetadataLock, LanguageService.OnConnectionWaitTimeout))
{