mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Rollback build break from previous check-in (#105)
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -33,14 +32,14 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
|||||||
/// Map from context keys to binding context instances
|
/// Map from context keys to binding context instances
|
||||||
/// Internal for testing purposes only
|
/// Internal for testing purposes only
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal ConcurrentDictionary<string, IBindingContext> BindingContextMap { get; set; }
|
internal Dictionary<string, IBindingContext> BindingContextMap { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor for a binding queue instance
|
/// Constructor for a binding queue instance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BindingQueue()
|
public BindingQueue()
|
||||||
{
|
{
|
||||||
this.BindingContextMap = new ConcurrentDictionary<string, IBindingContext>();
|
this.BindingContextMap = new Dictionary<string, IBindingContext>();
|
||||||
|
|
||||||
this.queueProcessorTask = StartQueueProcessor();
|
this.queueProcessorTask = StartQueueProcessor();
|
||||||
}
|
}
|
||||||
@@ -99,13 +98,16 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
|||||||
{
|
{
|
||||||
key = "disconnected_binding_context";
|
key = "disconnected_binding_context";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.BindingContextMap.ContainsKey(key))
|
lock (this.bindingContextLock)
|
||||||
{
|
{
|
||||||
this.BindingContextMap.TryAdd(key, new T());
|
if (!this.BindingContextMap.ContainsKey(key))
|
||||||
}
|
{
|
||||||
|
this.BindingContextMap.Add(key, new T());
|
||||||
|
}
|
||||||
|
|
||||||
return this.BindingContextMap[key];
|
return this.BindingContextMap[key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool HasPendingQueueItems
|
private bool HasPendingQueueItems
|
||||||
|
|||||||
Reference in New Issue
Block a user