Add group id and db display name to OE connection queue key (#531)

This commit is contained in:
Karl Burtram
2017-10-26 10:56:22 -07:00
committed by GitHub
parent 4c329921c7
commit 7ccf78aec1
3 changed files with 44 additions and 2 deletions

View File

@@ -72,12 +72,24 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
private string GetConnectionContextKey(ConnectionInfo connInfo)
{
ConnectionDetails details = connInfo.ConnectionDetails;
return string.Format("{0}_{1}_{2}_{3}",
string key = string.Format("{0}_{1}_{2}_{3}",
details.ServerName ?? "NULL",
details.DatabaseName ?? "NULL",
details.UserName ?? "NULL",
details.AuthenticationType ?? "NULL"
);
if (!string.IsNullOrEmpty(details.DatabaseDisplayName))
{
key += "_" + details.DatabaseDisplayName;
}
if (!string.IsNullOrEmpty(details.GroupId))
{
key += "_" + details.GroupId;
}
return key;
}
/// <summary>