mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-15 17:23:32 -05:00
Load properties used for OE node status by group instead of individually (#706)
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.SqlServer.Management.Smo;
|
||||
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
{
|
||||
@@ -12,10 +14,27 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
/// </summary>
|
||||
internal partial class TriggersChildFactory : SmoChildFactoryBase
|
||||
{
|
||||
public static readonly List<NodeSmoProperty> SmoPropertyList = new List<NodeSmoProperty>
|
||||
{
|
||||
new NodeSmoProperty
|
||||
{
|
||||
Name = "IsEnabled",
|
||||
ValidFor = ValidForFlag.All
|
||||
}
|
||||
};
|
||||
|
||||
public override string GetNodeStatus(object smoObject, SmoQueryContext smoContext)
|
||||
{
|
||||
return TriggersCustomeNodeHelper.GetStatus(smoObject);
|
||||
}
|
||||
|
||||
public override IEnumerable<NodeSmoProperty> SmoProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return TriggersChildFactory.SmoPropertyList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal partial class ServerLevelServerTriggersChildFactory : SmoChildFactoryBase
|
||||
@@ -24,6 +43,14 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
{
|
||||
return TriggersCustomeNodeHelper.GetStatus(smoObject);
|
||||
}
|
||||
|
||||
public override IEnumerable<NodeSmoProperty> SmoProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return TriggersChildFactory.SmoPropertyList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal partial class DatabaseTriggersChildFactory : SmoChildFactoryBase
|
||||
@@ -32,6 +59,14 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
{
|
||||
return TriggersCustomeNodeHelper.GetStatus(smoObject);
|
||||
}
|
||||
|
||||
public override IEnumerable<NodeSmoProperty> SmoProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return TriggersChildFactory.SmoPropertyList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static class TriggersCustomeNodeHelper
|
||||
|
||||
Reference in New Issue
Block a user