Clear and rebuild IntelliSense cache (#238)

* Stage changes to other machine

* IntelliSense cache rebuild command

* Move to other machine

* Add a test for overwriting binding queue.

* Move event handler into lanaguageservice.cs
This commit is contained in:
Karl Burtram
2017-02-16 12:23:26 -08:00
committed by GitHub
parent 6f8fc51d6f
commit 5d0c187684
8 changed files with 148 additions and 8 deletions

View File

@@ -123,6 +123,28 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
}
}
/// <summary>
/// Remove the binding queue entry
/// </summary>
protected void RemoveBindingContext(string key)
{
lock (this.bindingContextLock)
{
if (this.BindingContextMap.ContainsKey(key))
{
// disconnect existing connection
var bindingContext = this.BindingContextMap[key];
if (bindingContext.ServerConnection != null && bindingContext.ServerConnection.IsOpen)
{
bindingContext.ServerConnection.Disconnect();
}
// remove key from the map
this.BindingContextMap.Remove(key);
}
}
}
private bool HasPendingQueueItems
{
get