Load properties used for OE node status by group instead of individually (#706)

This commit is contained in:
Matt Irvine
2018-10-11 10:41:48 -07:00
committed by GitHub
parent a468a8b594
commit 8fe3d06068
6 changed files with 174 additions and 1 deletions

View File

@@ -4,9 +4,11 @@
//
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes;
using Microsoft.SqlTools.Utility;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
@@ -20,6 +22,81 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
return SmoColumnCustomNodeHelper.CalculateCustomLabel(smoObject, smoContext);
}
public override IEnumerable<NodeSmoProperty> SmoProperties
{
get
{
return new List<NodeSmoProperty>
{
new NodeSmoProperty
{
Name = "Computed",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "IsColumnSet",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "Nullable",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "DataType",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "InPrimaryKey",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "IsForeignKey",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "SystemType",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "Length",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "NumericPrecision",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "NumericScale",
ValidFor = ValidForFlag.All
},
new NodeSmoProperty
{
Name = "XmlSchemaNamespaceSchema",
ValidFor = ValidForFlag.NotSqlDw
},
new NodeSmoProperty
{
Name = "XmlSchemaNamespace",
ValidFor = ValidForFlag.NotSqlDw
},
new NodeSmoProperty
{
Name = "XmlDocumentConstraint",
ValidFor = ValidForFlag.NotSqlDw
}
};
}
}
}
/// <summary>