Revert "Update to latest .Net SDK 7.0 (#1760)" (#1763)

This reverts commit 71cda5bbdc.
This commit is contained in:
Karl Burtram
2022-11-15 11:29:41 -08:00
committed by GitHub
parent 71cda5bbdc
commit 3a5935df99
48 changed files with 107 additions and 144 deletions

View File

@@ -34,7 +34,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DacFx
{
try
{
var filters = Parameters.ObjectTypes.Select(MapType).ToArray();
var filters = Parameters.ObjectTypes.Select(t => MapType(t)).ToArray();
var objects = Model.GetObjects(DacQueryScopes.UserDefined, filters).ToList();
return objects.Select(o => new TSqlObjectInfo

View File

@@ -79,8 +79,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
Subtext = currentNode.GetDisplayLinesOfText(true),
RelativeCost = currentNode.RelativeCost,
Properties = GetProperties(currentNode.Properties),
Children = currentNode.Children.Select(ConvertShowPlanTreeToExecutionPlanTree).ToList(),
Edges = currentNode.Edges.Select(ConvertShowPlanEdgeToExecutionPlanEdge).ToList(),
Children = currentNode.Children.Select(x => ConvertShowPlanTreeToExecutionPlanTree(x)).ToList(),
Edges = currentNode.Edges.Select(x => ConvertShowPlanEdgeToExecutionPlanEdge(x)).ToList(),
Badges = GenerateNodeOverlay(currentNode),
Name = currentNode.DisplayName,
ElapsedTimeInMs = currentNode.ElapsedTimeInMs,

View File

@@ -597,7 +597,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
if (currentList != null &&
token != null && !string.IsNullOrWhiteSpace(token.Text) &&
token.Text.All(char.IsLetter) &&
token.Text.All(ch => char.IsLetter(ch)) &&
currentList.All(x => string.Compare(x.Label, token.Text, true) != 0
))
{

View File

@@ -1,5 +1,5 @@
// WARNING:
// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0
// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0
// from information in sr.strings
// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN
//

View File

@@ -13,10 +13,6 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RuntimeIdentifiers>$(ToolsServiceTargetRuntimes)</RuntimeIdentifiers>
<NoWarn>$(NoWarn);SYSLIB1045</NoWarn>
<NoWarn>$(NoWarn);CA1311</NoWarn>
<NoWarn>$(NoWarn);CA1854</NoWarn>
<NoWarn>$(NoWarn);CS8600;CS8603;CS8625</NoWarn>
</PropertyGroup>
<PropertyGroup>

View File

@@ -60,7 +60,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();
}

View File

@@ -116,7 +116,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
return;
}
IEnumerable<SmoQuerier> queriers = context.ServiceProvider.GetServices<SmoQuerier>(IsCompatibleQuerier);
IEnumerable<SmoQuerier> queriers = context.ServiceProvider.GetServices<SmoQuerier>(q => IsCompatibleQuerier(q));
var filters = this.Filters.ToList();
var smoProperties = this.SmoProperties.Where(p => ServerVersionHelper.IsValidFor(serverValidFor, p.ValidFor)).Select(x => x.Name);
if (!string.IsNullOrEmpty(name))

View File

@@ -229,7 +229,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TaskServices
//Run Task synchronously
public void Run()
{
Task.Run(RunAsync);
Task.Run(() => RunAsync());
}
/// <summary>