mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Minor improvements (#2250)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Microsoft.SqlTools.Utility
|
||||
@@ -13,7 +13,7 @@ namespace Microsoft.SqlTools.Utility
|
||||
{
|
||||
public GeneralRequestDetails()
|
||||
{
|
||||
Options = new Dictionary<string, object>(StringComparer.InvariantCultureIgnoreCase);
|
||||
Options = new ConcurrentDictionary<string, object>(StringComparer.InvariantCultureIgnoreCase);
|
||||
}
|
||||
|
||||
public T GetOptionValue<T>(string name, T defaultValue = default(T))
|
||||
@@ -96,21 +96,21 @@ namespace Microsoft.SqlTools.Utility
|
||||
|
||||
protected void SetOptionValue<T>(string name, T value)
|
||||
{
|
||||
Options = Options ?? new Dictionary<string, object>();
|
||||
Options = Options ?? new ConcurrentDictionary<string, object>();
|
||||
if (Options.ContainsKey(name))
|
||||
{
|
||||
Options[name] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
Options.Add(name, value);
|
||||
Options.TryAdd(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets the options
|
||||
/// </summary>
|
||||
public Dictionary<string, object> Options { get; set; }
|
||||
public ConcurrentDictionary<string, object> Options { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
|
||||
/// <summary>
|
||||
/// default text size
|
||||
/// </summary>
|
||||
private const int DefaultTextSize = 2147483647;
|
||||
private const int DefaultTextSize = int.MaxValue; // 2147483647;
|
||||
|
||||
/// <summary>
|
||||
/// default execution timeout
|
||||
|
||||
Reference in New Issue
Block a user