TreeNodeGenerator -> SmoTreeNodes (#1579)

* TreeNodeGenerator -> SmoTreeNodes

* space
This commit is contained in:
Charles Gagnon
2022-07-19 12:46:21 -07:00
committed by GitHub
parent 779339723f
commit 693bb0480a
6 changed files with 34 additions and 19 deletions

View File

@@ -24,7 +24,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
var assembly = typeof(ObjectExplorerService).Assembly;
var resource = assembly.GetManifestResourceStream("Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel.TreeNodeDefinition.xml");
var resource = assembly.GetManifestResourceStream("Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel.SmoTreeNodesDefinition.xml");
var serializer = new XmlSerializer(typeof(ServerExplorerTree));
NodeTypeDictionary = new Dictionary<string, HashSet<Node>>();
using (var reader = new StreamReader(resource))
@@ -149,7 +149,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
returnSet.Add(newPath);
}
}
return returnSet;
}
}
@@ -225,7 +225,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
return null;
}
var containedNode = TreeRoot.GetNode(containedType);
if (containedNode == this)
{
@@ -241,7 +241,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
return SR.Keys.GetString(this.LocLabel.Remove(0, 3));
}
return string.Empty;
}

View File

@@ -3,6 +3,10 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
// This file was generated by a T4 Template. Do not modify directly, instead update the SmoTreeNodesDefinition.xml file
// and re-run the T4 template. This can be done in Visual Studio by right-click in and choosing "Run Custom Tool",
// or from the command-line on any platform by running "build.cmd -Target=CodeGen" or "build.sh -Target=CodeGen".
using System;
using System.Collections.Generic;
using System.Composition;

View File

@@ -14,6 +14,10 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
// This file was generated by a T4 Template. Do not modify directly, instead update the SmoTreeNodesDefinition.xml file
// and re-run the T4 template. This can be done in Visual Studio by right-click in and choosing "Run Custom Tool",
// or from the command-line on any platform by running "build.cmd -Target=CodeGen" or "build.sh -Target=CodeGen".
using System;
using System.Collections.Generic;
using System.Composition;
@@ -25,7 +29,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
<#
var directory = Path.GetDirectoryName(Host.TemplateFile);
string xmlFile = Path.Combine(directory, "TreeNodeDefinition.xml");
string xmlFile = Path.Combine(directory, "SmoTreeNodesDefinition.xml");
/////////
// TODO - is Generate all the ReverseDependencies needed?
@@ -353,6 +357,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
return string.Join("|", flags);
}
public static string[] GetNodes(string xmlFile)
{
List<string> typesList = new List<string>();