OrCondition Constructor (Condition[])
Initializes a new instance of the OrCondition class with the component Condition objects.
Espacio de nombres: Microsoft.SqlServer.NotificationServices.Rules
Ensamblado: Microsoft.SqlServer.NotificationServices.Rules (in microsoft.sqlserver.notificationservices.rules.dll)
Sintaxis
'Declaración
Public Sub New ( _
ParamArray children As Condition() _
)
public OrCondition (
params Condition[] children
)
public:
OrCondition (
... array<Condition^>^ children
)
public OrCondition (
Condition[] children
)
public function OrCondition (
... children : Condition[]
)
Parámetros
- children
One or more Condition objects that will be individually evaluated and then the logically evaluated together using OR Boolean logic.
Notas
You must specify at least one child condition for an OrCondition object.
Ejemplo
// Create the NSInstance object.
NSInstance testInstance =
new NSInstance("InventoryTrackerInstance");
// Create the NSApplication object.
NSApplication testApplication =
new NSApplication(testInstance, "InventoryTracker");
// Define subscription properties
Subscription s = new Subscription(testApplication, "InventoryTrackerSubscriptions");
s.SubscriberId = "TestUser1";
s.Enabled = true;
s.RuleName = "InventoryTrackerRule";
s["DeviceName"] = "Work e-mail";
s["SubscriberLocale"] = "en-US";
// Define OrCondition
s.Condition = new OrCondition(
new SimpleLeafCondition(new FieldValue("Quantity"),
SimpleOperator.GreaterThanOrEqualTo,
500),
new SimpleLeafCondition(new FieldValue("Quantity"),
SimpleOperator.LessThanOrEqualTo,
35)
);
// Add subscription
s.Add();
' Create the NSInstance object.
Dim testInstance As New NSInstance("InventoryTrackerInstance")
' Create the NSApplication object.
Dim testApplication As _
New NSApplication(testInstance, "InventoryTracker")
' Define subscription properties
Dim s As New Subscription( _
testApplication, "InventoryTrackerSubscriptions")
s.SubscriberId = "TestUser1"
s.Enabled = True
s.RuleName = "InventoryTrackerRule"
s("DeviceName") = "Work e-mail"
s("SubscriberLocale") = "en-US"
' Define OrCondition
s.Condition = New OrCondition( _
New SimpleLeafCondition( _
New FieldValue("Quantity"), _
SimpleOperator.GreaterThanOrEqualTo, _
500), _
New SimpleLeafCondition( _
New FieldValue("Quantity"), _
SimpleOperator.LessThanOrEqualTo, _
35))
' Add subscription
s.Add()
Plataformas
Plataformas de desarrollo
Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.
Plataformas de destino
Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.
Vea también
Referencia
OrCondition Class
OrCondition Members
Microsoft.SqlServer.NotificationServices.Rules Namespace