mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-15 17:23:32 -05:00
Fixed node labels, status, sub types (#338)
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using Microsoft.SqlServer.Management.Smo;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Status for triggers
|
||||
/// </summary>
|
||||
public class SmoTriggerCustomNode
|
||||
{
|
||||
internal partial class TriggersChildFactory : SmoChildFactoryBase
|
||||
{
|
||||
public override string GetNodeStatus(object context)
|
||||
{
|
||||
return TriggersCustomeNodeHelper.GetStatus(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static class TriggersCustomeNodeHelper
|
||||
{
|
||||
internal static string GetStatus(object context)
|
||||
{
|
||||
Trigger trigger = context as Trigger;
|
||||
if (trigger != null)
|
||||
{
|
||||
if (!trigger.IsEnabled)
|
||||
{
|
||||
return "Disabled";
|
||||
}
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user