Share via


ViewInputType Class

RuleObject インスタンスへの入力として使用可能な View オブジェクトを示します。このクラスは継承できません。

名前空間: Microsoft.SqlServer.NotificationServices.Rules
アセンブリ: Microsoft.SqlServer.NotificationServices.Rules (microsoft.sqlserver.notificationservices.rules.dll 内)

構文

'宣言
Public Class ViewInputType
    Inherits InputType
public class ViewInputType : InputType
public ref class ViewInputType : public InputType
public class ViewInputType extends InputType
public class ViewInputType extends InputType

解説

プロパティまたは ViewInputType(View) コンストラクタを使用して、View プロパティを設定する必要があります。

継承階層

System.Object
   Microsoft.SqlServer.NotificationServices.Rules.RuleObject
     Microsoft.SqlServer.NotificationServices.Rules.InputType
      Microsoft.SqlServer.NotificationServices.Rules.ViewInputType

使用例

次の例では、ビュー (特にイベント ビュー) を PropertyRule オブジェクトの InputType として指定する方法を示します。

// Define a new property that defines "Few," "Some," and "Alot"
// of inventory. 
PropertyRule quantityCategory = new PropertyRule(
    new ViewInputType(eventView),
    new PropertyStatement(new SimpleLeafCondition(
        new FieldValue("Quantity"),
        SimpleOperator.LessThan, 100), "Few"),
    new PropertyStatement(new BetweenLeafCondition(
        new FieldValue("Quantity"), 100, 200), "Some"),
    new PropertyStatement(new SimpleLeafCondition(
            new FieldValue("Quantity"),
            SimpleOperator.GreaterThan, 200),
        "Alot"));

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


// Use the new property to return only products with "few" remaining
// in inventory. Note that the category definition can be reused.
s.Condition = new SimpleLeafCondition(
    new RuleValue(quantityCategory),
    SimpleOperator.Equals,
    "Few");

// Add subscription.
s.Add();

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

ViewInputType Members
Microsoft.SqlServer.NotificationServices.Rules Namespace