LinkLeafCondition.Operator Property
Gets or sets operator applied to the Filter results.
Namespace: Microsoft.SqlServer.NotificationServices.Rules
Assembly: Microsoft.SqlServer.NotificationServices.Rules (in microsoft.sqlserver.notificationservices.rules.dll)
Syntax
'Declaration
Public Property Operator As LinkLeafOperator
public LinkLeafOperator Operator { get; set; }
public:
property LinkLeafOperator Operator {
LinkLeafOperator get ();
void set (LinkLeafOperator value);
}
/** @property */
public LinkLeafOperator get_Operator ()
/** @property */
public void set_Operator (LinkLeafOperator value)
public function get Operator () : LinkLeafOperator
public function set Operator (value : LinkLeafOperator)
Property Value
A LinkLeafOperator object that specifies the operation for the LinkLeafCondition object.
Example
The following example shows how to use the Any operator in a LinkLeafCondition object:
// Subscribe to products in Subassembly location. This
// requires select permissions on all tables in the sample.
//Specify server and database.
Server server = new Server("MyServer");
Database db = server.Databases[nsApplication.DatabaseName];
// Specify tables and views used by the condition.
Table locationTable = db.Tables["Location", "Production"];
Table inventoryTable = db.Tables["ProductInventory", "Production"];
View eventView = db.Views["InventoryTrackerEvents",
"NS_InventoryTrackerApplication"];
// Filter defining "Subassembly" locations.
FilterRule toolCrib = new FilterRule(
new TableInputType(db.Tables["Location", "Production"]),
new SimpleLeafCondition(new FieldValue("Name"),
SimpleOperator.Equals, "Subassembly"));
// Create subscription and define basic properties.
s = new Subscription(nsApplication, subscriptionClassName);
s.SubscriberId = "Stephanie";
s.Enabled = true;
s.RuleName = "InventoryTrackerRule";
s.SetFieldValue("DeviceName", "myDevice");
s.SetFieldValue("SubscriberLocale", "en-us");
// Define a condition using the filter.
s.Condition = new LinkLeafCondition(
LinkLeafOperator.Any,
toolCrib,
new JoinClause(eventView.Columns["ProductId"],
inventoryTable.Columns["ProductId"]),
new JoinClause(inventoryTable.Columns["LocationId"],
locationTable.Columns["LocationId"]));
// Add subscription.
s.Add();
Thread Safety
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
See Also
Reference
LinkLeafCondition Class
LinkLeafCondition Members
Microsoft.SqlServer.NotificationServices.Rules Namespace