評価する Argument オブジェクトを使用して、BooleanLeafCondition クラスの新しいインスタンスを初期化します。
名前空間: Microsoft.SqlServer.NotificationServices.Rules
アセンブリ: Microsoft.SqlServer.NotificationServices.Rules (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は、Microsoft SQL Server の bit データ型へのキャストをサポートしている必要があります。
使用例
この例で使用されている条件では、フィールドを確認したり関数を使用したりするのではなく、単純にこの Boolean 値を true に設定することで、すべてのイベントの通知を行います。この方法は企業での監視サブスクリプションや、Notification Services アプリケーションが正常に通知を生成していることを確認するためのサブスクリプションで使用することができます。
// 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