This commit is contained in:
Arvind Ranasaria
2018-10-19 13:25:18 -07:00
committed by GitHub
parent 0efed221ee
commit 1ef70ef259
18 changed files with 323 additions and 338 deletions

View File

@@ -23,80 +23,76 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
return SmoColumnCustomNodeHelper.CalculateCustomLabel(smoObject, smoContext);
}
public override IEnumerable<NodeSmoProperty> SmoProperties
private readonly Lazy<List<NodeSmoProperty>> smoPropertiesLazy = new Lazy<List<NodeSmoProperty>>(() => new List<NodeSmoProperty>
{
get
new NodeSmoProperty
{
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
}
};
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
}
}
});
public override IEnumerable<NodeSmoProperty> SmoProperties => smoPropertiesLazy.Value;
}
/// <summary>