다음을 통해 공유


BooleanLeafCondition Constructor (Argument)

Initializes a new instance of the BooleanLeafCondition class with an Argument object to evaluate.

네임스페이스: Microsoft.SqlServer.NotificationServices.Rules
어셈블리: Microsoft.SqlServer.NotificationServices.Rules (in microsoft.sqlserver.notificationservices.rules.dll)

구문

‘선언
Public Sub New ( _
    argument As Argument _
)
public BooleanLeafCondition (
    Argument argument
)
public:
BooleanLeafCondition (
    Argument^ argument
)
public BooleanLeafCondition (
    Argument argument
)
public function BooleanLeafCondition (
    argument : Argument
)

매개 변수

  • argument
    The Boolean-valued Argument to evaluate. This parameter sets the Argument property.

주의

argument must support being cast to a Microsoft SQL Server bit data type.

Instead of checking a field or using a function, the condition in this example simply sets the Boolean value to true, resulting in notifications for all events. This could be used in an enterprise monitoring subscription or a subscription used to verify that the Notification Services application is generating notifications as expected:

// Create subscription and define basic properties.
s = new Subscription(nsApplication, subscriptionClassName);
s.SubscriberId = "David";
s.Enabled = true;
s.RuleName = "InventoryTrackerRule";
s.SetFieldValue("DeviceName", "myDevice");
s.SetFieldValue("SubscriberLocale", "en-us");

// Define a condition that is true for all events.
s.Condition = new BooleanLeafCondition(true);

// Add subscription.
s.Add();

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

BooleanLeafCondition Class
BooleanLeafCondition Members
Microsoft.SqlServer.NotificationServices.Rules Namespace