Fixed the issue with nodeType set to null for many sql objects in object explorer (#323)

* Fixed the issue with nodeType set to null for sql objects
This commit is contained in:
Leila Lali
2017-04-19 15:49:00 -07:00
committed by GitHub
parent 850cf8c3e4
commit 3fd4129488
7 changed files with 201 additions and 106 deletions

View File

@@ -8,7 +8,7 @@ using Microsoft.SqlServer.Management.Smo;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
internal partial class DatabaseInstanceTreeNode
internal partial class DatabaseTreeNode
{
/// <summary>

View File

@@ -58,10 +58,22 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
NodeValue = smoObject.Name;
ScriptSchemaObjectBase schemaBasecObject = smoObject as ScriptSchemaObjectBase;
ObjectMetadata = new Metadata.Contracts.ObjectMetadata();
ObjectMetadata.Name = smoObject.Name;
try
{
if(smoObject.Urn != null)
{
ObjectMetadata.MetadataTypeName = smoObject.Urn.Type;
}
}
catch
{
//Ignore the exception, sometimes the urn returns exception and I' not sure why
}
if (schemaBasecObject != null)
{
ObjectMetadata.MetadataTypeName = schemaBasecObject.Urn?.Type;
ObjectMetadata.Name = schemaBasecObject.Name;
ObjectMetadata.Schema = schemaBasecObject.Schema;
if (!string.IsNullOrEmpty(ObjectMetadata.Schema))
{

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<ServerExplorerTree>
<Node Name="Server" LocLabel="SR.SchemaHierarchy_ServerInstance" Image="Server">
<Node Name="Server" LocLabel="SR.SchemaHierarchy_Server" Image="Server">
<Child Name="Databases"/>
<Child Name="ServerLevelSecurity"/>
<Child Name="ServerLevelServerObjects"/>
</Node>
<Node Name="Databases" LocLabel="SR.SchemaHierarchy_Databases" IsAsyncLoad="" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlDatabase" TreeNode="DatabaseInstanceTreeNode">
<Node Name="Databases" LocLabel="SR.SchemaHierarchy_Databases" IsAsyncLoad="" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlDatabase" TreeNode="DatabaseTreeNode">
<Child Name="SystemDatabases"/>
</Node>
<Node Name="ServerLevelSecurity" LocLabel="SR.SchemaHierarchy_Security" BaseClass="ModelBased" ValidFor="Sql2005|Sql2008|Sql2012|Sql2014|Sql2016|SqlvNext|AzureV11|AzureV12|NotContainedUser|CanViewSecurity">
@@ -60,7 +60,7 @@
<Child Name="Security"/>
</Node>
<Node Name="Tables" LocLabel="SR.SchemaHierarchy_Tables" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="TableInstanceTreeNode">
<Node Name="Tables" LocLabel="SR.SchemaHierarchy_Tables" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="TableTreeNode">
<Filters>
<Filter Property="IsFileTable" Value="0" Type="bool" />
<Filter Property="IsExternal" Value="0" Type="bool" ValidFor="Sql2016|SqlvNext|AzureV12"/>
@@ -74,7 +74,7 @@
<Child Name="ExternalTables"/>
</Node>
<Node Name="Views" LocLabel="SR.SchemaHierarchy_Views" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlView" TreeNode="ViewInstanceTreeNode">
<Node Name="Views" LocLabel="SR.SchemaHierarchy_Views" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlView" TreeNode="ViewTreeNode">
<Child Name="SystemViews"/>
</Node>
@@ -89,7 +89,7 @@
<Child Name="Defaults"/>
<Child Name="Sequences"/>
</Node>
<Node Name="ExternalResources" LocLabel="SR.SchemaHierarchy_ExternalResources" BaseClass="ModelBased" TreeNode="ExternalResourceInstanceTreeNode" ValidFor="Sql2016|SqlvNext|AzureV12">
<Node Name="ExternalResources" LocLabel="SR.SchemaHierarchy_ExternalResources" BaseClass="ModelBased" TreeNode="ExternalResourceTreeNode" ValidFor="Sql2016|SqlvNext|AzureV12">
<Child Name="ExternalDataSources"/>
<Child Name="ExternalFileFormats"/>
</Node>
@@ -130,19 +130,19 @@
</Node>
<!-- Childs of Tables -->
<Node Name="SystemTables" LocLabel="SR.SchemaHierarchy_SystemTables" BaseClass="ModelBased" IsMsShippedOwned="true" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="TableInstanceTreeNode"/>
<Node Name="FileTables" LocLabel="SR.SchemaHierarchy_FileTables" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="TableInstanceTreeNode" ValidFor="Sql2012|Sql2014|Sql2016|SqlvNext|NotDebugInstance">
<Node Name="SystemTables" LocLabel="SR.SchemaHierarchy_SystemTables" BaseClass="ModelBased" IsMsShippedOwned="true" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="TableTreeNode"/>
<Node Name="FileTables" LocLabel="SR.SchemaHierarchy_FileTables" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="TableTreeNode" ValidFor="Sql2012|Sql2014|Sql2016|SqlvNext|NotDebug">
<Filters>
<Filter Property="IsFileTable" Value="1" Type="boolean" />
</Filters>
</Node>
<Node Name="ExternalTables" LocLabel="SR.SchemaHierarchy_ExternalTables" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="ExternalTableInstanceTreeNode" ValidFor="Sql2016|SqlvNext|AzureV12">
<Node Name="ExternalTables" LocLabel="SR.SchemaHierarchy_ExternalTables" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="ExternalTableTreeNode" ValidFor="Sql2016|SqlvNext|AzureV12">
<Filters>
<Filter Property="IsExternalTable" Value="1" Type="boolean" />
</Filters>
</Node>
<Node Name="Table" LocLabel="string.Empty" BaseClass="ModelBased" IsAsyncLoad="" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="HistoryTableInstanceTreeNode">
<Node Name="Table" LocLabel="string.Empty" BaseClass="ModelBased" IsAsyncLoad="" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlTable" TreeNode="HistoryTableTreeNode">
<!-- TODO Add special history table handling to only return related history table instead of all! Under Table, we directly show any related history tables.-->
<Filters>
<Filter Property="TemporalType" Type="Enum" ValidFor="Sql2016|SqlvNext|AzureV12">
@@ -190,7 +190,7 @@
</Node>
<Node Name="Statistics" LocLabel="SR.SchemaHierarchy_Statistics" BaseClass="ModelBased" Strategy="ElementsInRelationship" ChildQuerierTypes="SqlStatistic"/>
<Node Name="SystemViews" LocLabel="SR.SchemaHierarchy_SystemViews" BaseClass="ModelBased" IsMsShippedOwned="true" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlView" TreeNode="ViewInstanceTreeNode"/>
<Node Name="SystemViews" LocLabel="SR.SchemaHierarchy_SystemViews" BaseClass="ModelBased" IsMsShippedOwned="true" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlView" TreeNode="ViewTreeNode"/>
<Node Name="View" LocLabel="string.Empty" BaseClass="ModelBased" IsAsyncLoad="" Strategy="PopulateDetails">
<Child Name="Columns"/>
@@ -229,7 +229,7 @@
<Child Name="SystemSpatialDataTypes"/>
</Node>
<Node Name="UserDefinedDataTypes" LocLabel="SR.SchemaHierarchy_UserDefinedDataTypes" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedDataType"/>
<Node Name="UserDefinedTableTypes" LocLabel="SR.SchemaHierarchy_UserDefinedTableTypes" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedTableType" TreeNode="UserDefinedTableTypeInstanceTreeNode" ValidFor="Sql2008|Sql2012|Sql2014|Sql2016|SqlvNext|AzureV11|AzureV12"/>
<Node Name="UserDefinedTableTypes" LocLabel="SR.SchemaHierarchy_UserDefinedTableTypes" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedTableType" TreeNode="UserDefinedTableTypeTreeNode" ValidFor="Sql2008|Sql2012|Sql2014|Sql2016|SqlvNext|AzureV11|AzureV12"/>
<Node Name="UserDefinedTypes" LocLabel="SR.SchemaHierarchy_UserDefinedTypes" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedType" ValidFor="Sql2005|Sql2008|Sql2012|Sql2014|Sql2016|SqlvNext|AzureV12"/>
<Node Name="XmlSchemaCollections" LocLabel="SR.SchemaHierarchy_XMLSchemaCollections" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlXmlSchemaCollection" ValidFor="Sql2005|Sql2008|Sql2012|Sql2014|Sql2016|SqlvNext|AzureV12"/>
@@ -263,16 +263,16 @@
<Node Name="ExternalDataSources" LocLabel="SR.SchemaHierarchy_ExternalDataSources" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlExternalDataSource" ValidFor="Sql2016|SqlvNext|AzureV12"/>
<Node Name="ExternalFileFormats" LocLabel="SR.SchemaHierarchy_ExternalFileFormats" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlExternalFileFormat" ValidFor="Sql2016|SqlvNext"/>
<Node Name="StoredProcedures" LocLabel="SR.SchemaHierarchy_StoredProcedures" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlProcedure" TreeNode="StoredProcedureInstanceTreeNode">
<Node Name="StoredProcedures" LocLabel="SR.SchemaHierarchy_StoredProcedures" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlProcedure" TreeNode="StoredProcedureTreeNode">
<Child Name="SystemStoredProcedures"/>
</Node>
<Node Name="SystemStoredProcedures" LocLabel="SR.SchemaHierarchy_SystemStoredProcedures" BaseClass="ModelBased" IsMsShippedOwned="true" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlProcedure" TreeNode="StoredProcedureInstanceTreeNode"/>
<Node Name="SystemStoredProcedures" LocLabel="SR.SchemaHierarchy_SystemStoredProcedures" BaseClass="ModelBased" IsMsShippedOwned="true" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlProcedure" TreeNode="StoredProcedureTreeNode"/>
<Node Name="StoredProcedure" LocLabel="string.Empty" BaseClass="ModelBased" ChildQuerierTypes="" IsAsyncLoad="" Strategy="PopulateDetails">
<Child Name="StoredProcedureParameters"/>
</Node>
<Node Name="StoredProcedureParameters" LocLabel="SR.SchemaHierarchy_Parameters" BaseClass="ModelBased" Strategy="StoredProcedureParameters" ChildQuerierTypes="SqlSubroutineParameter" DisableSort=""/>
<Node Name="TableValuedFunctions" LocLabel="SR.SchemaHierarchy_TableValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="TableValuedFunctionInstanceTreeNode">
<Node Name="TableValuedFunctions" LocLabel="SR.SchemaHierarchy_TableValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="TableValuedFunctionTreeNode">
<Filters>
<Filter Property="UserDefinedFunctionType" Type="Enum" ValidFor="Sql2016|SqlvNext|AzureV12">
<Value>UserDefinedFunctionType.Table</Value>
@@ -284,7 +284,7 @@
</Node>
<Node Name="TableValuedFunctionParameters" LocLabel="SR.SchemaHierarchy_Parameters" BaseClass="ModelBased" Strategy="FunctionParameters" ChildQuerierTypes="SqlSubroutineParameter" DisableSort=""/>
<Node Name="ScalarValuedFunctions" LocLabel="SR.SchemaHierarchy_ScalarValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="ScalarValuedFunctionInstanceTreeNode" >
<Node Name="ScalarValuedFunctions" LocLabel="SR.SchemaHierarchy_ScalarValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="ScalarValuedFunctionTreeNode" >
<Filters>
<Filter Property="UserDefinedFunctionType" Type="Enum" ValidFor="Sql2016|SqlvNext|AzureV12">
<Value>UserDefinedFunctionType.Table</Value>
@@ -296,7 +296,7 @@
</Node>
<Node Name="ScalarValuedFunctionParameters" LocLabel="SR.SchemaHierarchy_Parameters" BaseClass="ModelBased" Strategy="FunctionParameters" ChildQuerierTypes="SqlSubroutineParameter" DisableSort=""/>
<Node Name="AggregateFunctions" LocLabel="SR.SchemaHierarchy_AggregateFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedAggregate" TreeNode="AggregateFunctionInstanceTreeNode" ValidFor="Sql2005|Sql2008|Sql2012|Sql2014|Sql2016|SqlvNext|AzureV12"/>
<Node Name="AggregateFunctions" LocLabel="SR.SchemaHierarchy_AggregateFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedAggregate" TreeNode="AggregateFunctionTreeNode" ValidFor="Sql2005|Sql2008|Sql2012|Sql2014|Sql2016|SqlvNext|AzureV12"/>
<Node Name="AggregateFunction" LocLabel="string.Empty" BaseClass="ModelBased" ChildQuerierTypes="" IsAsyncLoad="" Strategy="PopulateDetails">
<Child Name="AggregateFunctionParameters"/>
</Node>
@@ -311,7 +311,7 @@
<Node Name="RemoteServiceBindings" LocLabel="SR.SchemaHierarchy_RemoteServiceBindings" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlRemoteServiceBinding"/>
<Node Name="BrokerPriorities" LocLabel="SR.SchemaHierarchy_BrokerPriorities" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlBrokerPriority" ValidFor="Sql2008|Sql2012|Sql2014|Sql2016|SqlvNext"/>
<Node Name="FileGroups" LocLabel="SR.SchemaHierarchy_FileGroups" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlFileGroup" TreeNode="FileGroupInstanceTreeNode"/>
<Node Name="FileGroups" LocLabel="SR.SchemaHierarchy_FileGroups" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlFileGroup" TreeNode="FileGroupTreeNode"/>
<Node Name="FullTextCatalogs" LocLabel="SR.SchemaHierarchy_FullTextCatalogs" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlFullTextCatalog"/>
<Node Name="FullTextStopLists" LocLabel="SR.SchemaHierarchy_FullTextStopLists" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlFullTextStopList" ValidFor="Sql2008|Sql2012|Sql2014|Sql2016|SqlvNext|AzureV12"/>
<Node Name="SqlLogFiles" LocLabel="SR.SchemaHierarchy_LogFiles" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlFile"/>
@@ -319,7 +319,7 @@
<Node Name="PartitionSchemes" LocLabel="SR.SchemaHierarchy_PartitionSchemes" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlPartitionScheme"/>
<Node Name="SearchPropertyLists" LocLabel="SR.SchemaHierarchy_SearchPropertyLists" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlSearchPropertyList" ValidFor="Sql2012|Sql2014|Sql2016|SqlvNext|AzureV12"/>
<Node Name="FileGroupInstance" LocLabel="string.Empty" BaseClass="ModelBased" ChildQuerierTypes="">
<Node Name="FileGroup" LocLabel="string.Empty" BaseClass="ModelBased" ChildQuerierTypes="">
<Child Name="FileGroupFiles"/>
</Node>
@@ -375,18 +375,18 @@
<Node Name="SystemServices" LocLabel="SR.SchemaHierarchy_SystemServices" BaseClass="ModelBased" IsMsShippedOwned="true" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlService"/>
<CodeGenOptions>
<UniqueTreeNode Name="DatabaseInstanceTreeNode"/>
<UniqueTreeNode Name="TableInstanceTreeNode"/>
<UniqueTreeNode Name="ViewInstanceTreeNode"/>
<UniqueTreeNode Name="UserDefinedTableTypeInstanceTreeNode"/>
<UniqueTreeNode Name="StoredProcedureInstanceTreeNode"/>
<UniqueTreeNode Name="TableValuedFunctionInstanceTreeNode"/>
<UniqueTreeNode Name="ScalarValuedFunctionInstanceTreeNode"/>
<UniqueTreeNode Name="AggregateFunctionInstanceTreeNode"/>
<UniqueTreeNode Name="FileGroupInstanceTreeNode"/>
<UniqueTreeNode Name="ExternalTableInstanceTreeNode"/>
<UniqueTreeNode Name="ExternalResourceInstanceTreeNode"/>
<UniqueTreeNode Name="HistoryTableInstanceTreeNode" />
<UniqueTreeNode Name="DatabaseTreeNode"/>
<UniqueTreeNode Name="TableTreeNode"/>
<UniqueTreeNode Name="ViewTreeNode"/>
<UniqueTreeNode Name="UserDefinedTableTypeTreeNode"/>
<UniqueTreeNode Name="StoredProcedureTreeNode"/>
<UniqueTreeNode Name="TableValuedFunctionTreeNode"/>
<UniqueTreeNode Name="ScalarValuedFunctionTreeNode"/>
<UniqueTreeNode Name="AggregateFunctionTreeNode"/>
<UniqueTreeNode Name="FileGroupTreeNode"/>
<UniqueTreeNode Name="ExternalTableTreeNode"/>
<UniqueTreeNode Name="ExternalResourceTreeNode"/>
<UniqueTreeNode Name="HistoryTableTreeNode" />
</CodeGenOptions>
<!-- WARNING: Specifying reverse dependencies that could load large numbers of objects will be detrimental to performance. -->

View File

@@ -1,15 +1,15 @@
using System;
using System.Collections.Generic;
using System.Composition;
using Microsoft.SqlTools.ServiceLayer;
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
internal sealed partial class DatabaseInstanceTreeNode : SmoTreeNode
using System;
using System.Collections.Generic;
using System.Composition;
using Microsoft.SqlTools.ServiceLayer;
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
internal sealed partial class DatabaseTreeNode : SmoTreeNode
{
public DatabaseInstanceTreeNode() : base()
public DatabaseTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "Database";
@@ -18,9 +18,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class TableInstanceTreeNode : SmoTreeNode
internal sealed partial class TableTreeNode : SmoTreeNode
{
public TableInstanceTreeNode() : base()
public TableTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "Table";
@@ -29,9 +29,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class ViewInstanceTreeNode : SmoTreeNode
internal sealed partial class ViewTreeNode : SmoTreeNode
{
public ViewInstanceTreeNode() : base()
public ViewTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "View";
@@ -40,9 +40,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class UserDefinedTableTypeInstanceTreeNode : SmoTreeNode
internal sealed partial class UserDefinedTableTypeTreeNode : SmoTreeNode
{
public UserDefinedTableTypeInstanceTreeNode() : base()
public UserDefinedTableTypeTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "UserDefinedTableType";
@@ -51,9 +51,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class StoredProcedureInstanceTreeNode : SmoTreeNode
internal sealed partial class StoredProcedureTreeNode : SmoTreeNode
{
public StoredProcedureInstanceTreeNode() : base()
public StoredProcedureTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "StoredProcedure";
@@ -62,9 +62,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class TableValuedFunctionInstanceTreeNode : SmoTreeNode
internal sealed partial class TableValuedFunctionTreeNode : SmoTreeNode
{
public TableValuedFunctionInstanceTreeNode() : base()
public TableValuedFunctionTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "TableValuedFunction";
@@ -73,9 +73,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class ScalarValuedFunctionInstanceTreeNode : SmoTreeNode
internal sealed partial class ScalarValuedFunctionTreeNode : SmoTreeNode
{
public ScalarValuedFunctionInstanceTreeNode() : base()
public ScalarValuedFunctionTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "ScalarValuedFunction";
@@ -84,9 +84,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class AggregateFunctionInstanceTreeNode : SmoTreeNode
internal sealed partial class AggregateFunctionTreeNode : SmoTreeNode
{
public AggregateFunctionInstanceTreeNode() : base()
public AggregateFunctionTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "AggregateFunction";
@@ -95,20 +95,20 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class FileGroupInstanceTreeNode : SmoTreeNode
internal sealed partial class FileGroupTreeNode : SmoTreeNode
{
public FileGroupInstanceTreeNode() : base()
public FileGroupTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "FileGroupInstance";
this.NodeTypeId = NodeTypes.FileGroupInstance;
this.NodeType = "FileGroup";
this.NodeTypeId = NodeTypes.FileGroup;
OnInitialize();
}
}
internal sealed partial class ExternalTableInstanceTreeNode : SmoTreeNode
internal sealed partial class ExternalTableTreeNode : SmoTreeNode
{
public ExternalTableInstanceTreeNode() : base()
public ExternalTableTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "ExternalTable";
@@ -117,9 +117,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class ExternalResourceInstanceTreeNode : SmoTreeNode
internal sealed partial class ExternalResourceTreeNode : SmoTreeNode
{
public ExternalResourceInstanceTreeNode() : base()
public ExternalResourceTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "ExternalResource";
@@ -128,9 +128,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
}
}
internal sealed partial class HistoryTableInstanceTreeNode : SmoTreeNode
internal sealed partial class HistoryTableTreeNode : SmoTreeNode
{
public HistoryTableInstanceTreeNode() : base()
public HistoryTableTreeNode() : base()
{
NodeValue = string.Empty;
this.NodeType = "HistoryTable";
@@ -141,7 +141,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class ServerInstanceChildFactory : SmoChildFactoryBase
internal partial class ServerChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "Server" }; }
@@ -197,7 +197,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new DatabaseInstanceTreeNode();
var child = new DatabaseTreeNode();
InitializeChild(child, context);
return child;
}
@@ -339,6 +339,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelLinkedServerLogin";
InitializeChild(child, context);
return child;
}
@@ -362,6 +363,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelLogin";
InitializeChild(child, context);
return child;
}
@@ -385,6 +387,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelServerRole";
InitializeChild(child, context);
return child;
}
@@ -408,6 +411,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelCredential";
InitializeChild(child, context);
return child;
}
@@ -431,6 +435,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelCryptographicProvider";
InitializeChild(child, context);
return child;
}
@@ -454,6 +459,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelServerAudit";
InitializeChild(child, context);
return child;
}
@@ -477,6 +483,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelServerAuditSpecification";
InitializeChild(child, context);
return child;
}
@@ -500,6 +507,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelEndpoint";
InitializeChild(child, context);
return child;
}
@@ -523,6 +531,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelLinkedServer";
InitializeChild(child, context);
return child;
}
@@ -546,6 +555,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelServerTrigger";
InitializeChild(child, context);
return child;
}
@@ -569,6 +579,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ServerLevelErrorMessage";
InitializeChild(child, context);
return child;
}
@@ -576,7 +587,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class DatabaseInstanceChildFactory : SmoChildFactoryBase
internal partial class DatabaseChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "Database" }; }
@@ -670,7 +681,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
NodeValue = SR.SchemaHierarchy_FileTables,
NodeType = "Folder",
NodeTypeId = NodeTypes.FileTables,
ValidFor = ValidForFlag.Sql2012|ValidForFlag.Sql2014|ValidForFlag.Sql2016|ValidForFlag.NotDebugInstance,
ValidFor = ValidForFlag.Sql2012|ValidForFlag.Sql2014|ValidForFlag.Sql2016,
SortPriority = SmoTreeNode.NextSortPriority,
});
currentChildren.Add(new FolderNode {
@@ -692,7 +703,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new TableInstanceTreeNode();
var child = new TableTreeNode();
InitializeChild(child, context);
return child;
}
@@ -725,7 +736,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new ViewInstanceTreeNode();
var child = new ViewTreeNode();
InitializeChild(child, context);
return child;
}
@@ -749,6 +760,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Synonym";
InitializeChild(child, context);
return child;
}
@@ -1093,7 +1105,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new TableInstanceTreeNode();
var child = new TableTreeNode();
InitializeChild(child, context);
return child;
}
@@ -1115,7 +1127,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new TableInstanceTreeNode();
var child = new TableTreeNode();
InitializeChild(child, context);
return child;
}
@@ -1137,7 +1149,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new ExternalTableInstanceTreeNode();
var child = new ExternalTableTreeNode();
InitializeChild(child, context);
return child;
}
@@ -1145,7 +1157,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class TableInstanceChildFactory : SmoChildFactoryBase
internal partial class TableChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "Table" }; }
@@ -1199,7 +1211,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new HistoryTableInstanceTreeNode();
var child = new HistoryTableTreeNode();
InitializeChild(child, context);
return child;
}
@@ -1207,7 +1219,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class HistoryTableInstanceChildFactory : SmoChildFactoryBase
internal partial class HistoryTableChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "HistoryTable" }; }
@@ -1252,7 +1264,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class ExternalTableInstanceChildFactory : SmoChildFactoryBase
internal partial class ExternalTableChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "ExternalTable" }; }
@@ -1307,6 +1319,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Column";
child.SortPriority = SmoTreeNode.NextSortPriority;
InitializeChild(child, context);
return child;
@@ -1331,6 +1344,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Key";
InitializeChild(child, context);
return child;
}
@@ -1354,6 +1368,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Constraint";
InitializeChild(child, context);
return child;
}
@@ -1377,6 +1392,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Trigger";
InitializeChild(child, context);
return child;
}
@@ -1400,6 +1416,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Indexe";
InitializeChild(child, context);
return child;
}
@@ -1423,6 +1440,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Statistic";
InitializeChild(child, context);
return child;
}
@@ -1444,7 +1462,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new ViewInstanceTreeNode();
var child = new ViewTreeNode();
InitializeChild(child, context);
return child;
}
@@ -1452,7 +1470,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class ViewInstanceChildFactory : SmoChildFactoryBase
internal partial class ViewChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "View" }; }
@@ -1556,6 +1574,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "DatabaseTrigger";
InitializeChild(child, context);
return child;
}
@@ -1579,6 +1598,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Assemblie";
InitializeChild(child, context);
return child;
}
@@ -1654,6 +1674,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Rule";
InitializeChild(child, context);
return child;
}
@@ -1677,6 +1698,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Default";
InitializeChild(child, context);
return child;
}
@@ -1700,6 +1722,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Sequence";
InitializeChild(child, context);
return child;
}
@@ -1798,6 +1821,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "UserDefinedDataType";
InitializeChild(child, context);
return child;
}
@@ -1819,7 +1843,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new UserDefinedTableTypeInstanceTreeNode();
var child = new UserDefinedTableTypeTreeNode();
InitializeChild(child, context);
return child;
}
@@ -1843,6 +1867,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "UserDefinedType";
InitializeChild(child, context);
return child;
}
@@ -1866,6 +1891,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "XmlSchemaCollection";
InitializeChild(child, context);
return child;
}
@@ -1873,7 +1899,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class UserDefinedTableTypeInstanceChildFactory : SmoChildFactoryBase
internal partial class UserDefinedTableTypeChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "UserDefinedTableType" }; }
@@ -1933,6 +1959,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "UserDefinedTableTypeColumn";
child.SortPriority = SmoTreeNode.NextSortPriority;
InitializeChild(child, context);
return child;
@@ -1957,6 +1984,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "UserDefinedTableTypeKey";
InitializeChild(child, context);
return child;
}
@@ -1980,6 +2008,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "UserDefinedTableTypeConstraint";
InitializeChild(child, context);
return child;
}
@@ -2003,6 +2032,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemExactNumeric";
InitializeChild(child, context);
return child;
}
@@ -2026,6 +2056,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemApproximateNumeric";
InitializeChild(child, context);
return child;
}
@@ -2049,6 +2080,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemDateAndTime";
InitializeChild(child, context);
return child;
}
@@ -2072,6 +2104,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemCharacterString";
InitializeChild(child, context);
return child;
}
@@ -2095,6 +2128,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemUnicodeCharacterString";
InitializeChild(child, context);
return child;
}
@@ -2118,6 +2152,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemBinaryString";
InitializeChild(child, context);
return child;
}
@@ -2141,6 +2176,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemOtherDataType";
InitializeChild(child, context);
return child;
}
@@ -2164,6 +2200,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemClrDataType";
InitializeChild(child, context);
return child;
}
@@ -2187,6 +2224,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemSpatialDataType";
InitializeChild(child, context);
return child;
}
@@ -2210,6 +2248,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ExternalDataSource";
InitializeChild(child, context);
return child;
}
@@ -2233,6 +2272,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ExternalFileFormat";
InitializeChild(child, context);
return child;
}
@@ -2265,7 +2305,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new StoredProcedureInstanceTreeNode();
var child = new StoredProcedureTreeNode();
InitializeChild(child, context);
return child;
}
@@ -2287,7 +2327,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new StoredProcedureInstanceTreeNode();
var child = new StoredProcedureTreeNode();
InitializeChild(child, context);
return child;
}
@@ -2295,7 +2335,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class StoredProcedureInstanceChildFactory : SmoChildFactoryBase
internal partial class StoredProcedureChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "StoredProcedure" }; }
@@ -2343,6 +2383,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "StoredProcedureParameter";
child.SortPriority = SmoTreeNode.NextSortPriority;
InitializeChild(child, context);
return child;
@@ -2365,7 +2406,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new TableValuedFunctionInstanceTreeNode();
var child = new TableValuedFunctionTreeNode();
InitializeChild(child, context);
return child;
}
@@ -2373,7 +2414,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class TableValuedFunctionInstanceChildFactory : SmoChildFactoryBase
internal partial class TableValuedFunctionChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "TableValuedFunction" }; }
@@ -2421,6 +2462,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "TableValuedFunctionParameter";
child.SortPriority = SmoTreeNode.NextSortPriority;
InitializeChild(child, context);
return child;
@@ -2443,7 +2485,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new ScalarValuedFunctionInstanceTreeNode();
var child = new ScalarValuedFunctionTreeNode();
InitializeChild(child, context);
return child;
}
@@ -2451,7 +2493,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class ScalarValuedFunctionInstanceChildFactory : SmoChildFactoryBase
internal partial class ScalarValuedFunctionChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "ScalarValuedFunction" }; }
@@ -2499,6 +2541,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ScalarValuedFunctionParameter";
child.SortPriority = SmoTreeNode.NextSortPriority;
InitializeChild(child, context);
return child;
@@ -2521,7 +2564,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new AggregateFunctionInstanceTreeNode();
var child = new AggregateFunctionTreeNode();
InitializeChild(child, context);
return child;
}
@@ -2529,7 +2572,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class AggregateFunctionInstanceChildFactory : SmoChildFactoryBase
internal partial class AggregateFunctionChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "AggregateFunction" }; }
@@ -2577,6 +2620,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "AggregateFunctionParameter";
child.SortPriority = SmoTreeNode.NextSortPriority;
InitializeChild(child, context);
return child;
@@ -2601,6 +2645,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "RemoteServiceBinding";
InitializeChild(child, context);
return child;
}
@@ -2624,6 +2669,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "BrokerPrioritie";
InitializeChild(child, context);
return child;
}
@@ -2645,7 +2691,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override TreeNode CreateChild(TreeNode parent, object context)
{
var child = new FileGroupInstanceTreeNode();
var child = new FileGroupTreeNode();
InitializeChild(child, context);
return child;
}
@@ -2669,6 +2715,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "FullTextCatalog";
InitializeChild(child, context);
return child;
}
@@ -2692,6 +2739,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "FullTextStopList";
InitializeChild(child, context);
return child;
}
@@ -2715,6 +2763,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SqlLogFile";
InitializeChild(child, context);
return child;
}
@@ -2738,6 +2787,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "PartitionFunction";
InitializeChild(child, context);
return child;
}
@@ -2761,6 +2811,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "PartitionScheme";
InitializeChild(child, context);
return child;
}
@@ -2784,6 +2835,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SearchPropertyList";
InitializeChild(child, context);
return child;
}
@@ -2791,9 +2843,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
[Export(typeof(ChildFactory))]
[Shared]
internal partial class FileGroupInstanceChildFactory : SmoChildFactoryBase
internal partial class FileGroupChildFactory : SmoChildFactoryBase
{
public override IEnumerable<string> ApplicableParents() { return new[] { "FileGroupInstance" }; }
public override IEnumerable<string> ApplicableParents() { return new[] { "FileGroup" }; }
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
{
@@ -2832,6 +2884,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "FileGroupFile";
InitializeChild(child, context);
return child;
}
@@ -2855,6 +2908,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "User";
InitializeChild(child, context);
return child;
}
@@ -2910,6 +2964,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Schema";
InitializeChild(child, context);
return child;
}
@@ -2933,6 +2988,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "AsymmetricKey";
InitializeChild(child, context);
return child;
}
@@ -2956,6 +3012,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Certificate";
InitializeChild(child, context);
return child;
}
@@ -2979,6 +3036,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SymmetricKey";
InitializeChild(child, context);
return child;
}
@@ -3002,6 +3060,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "DatabaseEncryptionKey";
InitializeChild(child, context);
return child;
}
@@ -3025,6 +3084,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "MasterKey";
InitializeChild(child, context);
return child;
}
@@ -3048,6 +3108,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "DatabaseAuditSpecification";
InitializeChild(child, context);
return child;
}
@@ -3071,6 +3132,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SecurityPolicie";
InitializeChild(child, context);
return child;
}
@@ -3094,6 +3156,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "DatabaseScopedCredential";
InitializeChild(child, context);
return child;
}
@@ -3150,6 +3213,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "DatabaseRole";
InitializeChild(child, context);
return child;
}
@@ -3173,6 +3237,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ApplicationRole";
InitializeChild(child, context);
return child;
}
@@ -3196,6 +3261,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ColumnMasterKey";
InitializeChild(child, context);
return child;
}
@@ -3219,6 +3285,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "ColumnEncryptionKey";
InitializeChild(child, context);
return child;
}
@@ -3253,6 +3320,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "MessageType";
InitializeChild(child, context);
return child;
}
@@ -3276,6 +3344,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemMessageType";
InitializeChild(child, context);
return child;
}
@@ -3310,6 +3379,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Contract";
InitializeChild(child, context);
return child;
}
@@ -3333,6 +3403,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemContract";
InitializeChild(child, context);
return child;
}
@@ -3367,6 +3438,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Queue";
InitializeChild(child, context);
return child;
}
@@ -3390,6 +3462,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemQueue";
InitializeChild(child, context);
return child;
}
@@ -3424,6 +3497,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "Service";
InitializeChild(child, context);
return child;
}
@@ -3447,10 +3521,11 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
var child = new SmoTreeNode();
child.IsAlwaysLeaf = true;
child.NodeType = "SystemService";
InitializeChild(child, context);
return child;
}
}
}
}

View File

@@ -179,6 +179,12 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
WriteLine(" var child = new SmoTreeNode();");
WriteLine(" child.IsAlwaysLeaf = true;");
if (type.EndsWith("s"))
{
var typeName = type.Substring(0, type.Length - 1);
WriteLine(string.Format(" child.NodeType = \"{0}\";", typeName));
}
}
else
{