mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-03 09:35:39 -05:00
Update to .NET 7 SDK (#1792)
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DacFx
|
||||
{
|
||||
try
|
||||
{
|
||||
var filters = Parameters.ObjectTypes.Select(t => MapType(t)).ToArray();
|
||||
var filters = Parameters.ObjectTypes.Select(MapType).ToArray();
|
||||
var objects = Model.GetObjects(DacQueryScopes.UserDefined, filters).ToList();
|
||||
|
||||
return objects.Select(o => new TSqlObjectInfo
|
||||
|
||||
@@ -81,8 +81,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||
Subtext = currentNode.GetDisplayLinesOfText(true),
|
||||
RelativeCost = currentNode.RelativeCost,
|
||||
Properties = GetProperties(currentNode.Properties),
|
||||
Children = currentNode.Children.Select(x => ConvertShowPlanTreeToExecutionPlanTree(x)).ToList(),
|
||||
Edges = currentNode.Edges.Select(x => ConvertShowPlanEdgeToExecutionPlanEdge(x)).ToList(),
|
||||
Children = currentNode.Children.Select(ConvertShowPlanTreeToExecutionPlanTree).ToList(),
|
||||
Edges = currentNode.Edges.Select(ConvertShowPlanEdgeToExecutionPlanEdge).ToList(),
|
||||
Badges = GenerateNodeOverlay(currentNode),
|
||||
Name = currentNode.DisplayName,
|
||||
ElapsedTimeInMs = currentNode.ElapsedTimeInMs,
|
||||
|
||||
@@ -599,7 +599,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
||||
{
|
||||
if (currentList != null &&
|
||||
token != null && !string.IsNullOrWhiteSpace(token.Text) &&
|
||||
token.Text.All(ch => char.IsLetter(ch)) &&
|
||||
token.Text.All(char.IsLetter) &&
|
||||
currentList.All(x => string.Compare(x.Label, token.Text, true) != 0
|
||||
))
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// WARNING:
|
||||
// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0
|
||||
// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0
|
||||
// from information in sr.strings
|
||||
// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN
|
||||
//
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<RuntimeIdentifiers>$(ToolsServiceTargetRuntimes)</RuntimeIdentifiers>
|
||||
<!-- TODO FIX THESE WARNINGS ASAP -->
|
||||
<NoWarn>$(NoWarn);SYSLIB1045;CA1311;CA1854;CS8600;CS8603;CS8625</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer
|
||||
public ObjectExplorerService()
|
||||
{
|
||||
sessionMap = new ConcurrentDictionary<string, ObjectExplorerSession>();
|
||||
applicableNodeChildFactories = new Lazy<Dictionary<string, HashSet<ChildFactory>>>(() => PopulateFactories());
|
||||
applicableNodeChildFactories = new Lazy<Dictionary<string, HashSet<ChildFactory>>>(PopulateFactories);
|
||||
NodePathGenerator.Initialize();
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
return;
|
||||
}
|
||||
|
||||
IEnumerable<SmoQuerier> queriers = context.ServiceProvider.GetServices<SmoQuerier>(q => IsCompatibleQuerier(q));
|
||||
IEnumerable<SmoQuerier> queriers = context.ServiceProvider.GetServices<SmoQuerier>(IsCompatibleQuerier);
|
||||
var filters = this.Filters.ToList();
|
||||
var smoProperties = this.SmoProperties.Where(p => ServerVersionHelper.IsValidFor(serverValidFor, p.ValidFor)).Select(x => x.Name);
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
|
||||
@@ -11,6 +11,7 @@ using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
using Microsoft.SqlTools.Utility;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer
|
||||
{
|
||||
@@ -22,7 +23,7 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
/// <summary>
|
||||
/// Main entry point into the SQL Tools API Service Layer
|
||||
/// </summary>
|
||||
internal static void Main(string[] args)
|
||||
internal static async Task Main(string[] args)
|
||||
{
|
||||
SqlClientListener? sqlClientListener = null;
|
||||
try
|
||||
@@ -61,7 +62,7 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
ProcessExitTimer.Start(commandOptions.ParentProcessId.Value);
|
||||
}
|
||||
|
||||
serviceHost.WaitForExit();
|
||||
await serviceHost.WaitForExitAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TaskServices
|
||||
//Run Task synchronously
|
||||
public void Run()
|
||||
{
|
||||
Task.Run(() => RunAsync());
|
||||
Task.Run(RunAsync);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user