SubscriptionClient.AddRule Method

Definition

Overloads

AddRule(RuleDescription)

Adds a new rule to the SubscriptionDescription using the specified rule description.

AddRule(String, Filter)

Adds a rule to the current subscription with the specified name and filter expression.

AddRule(RuleDescription)

Adds a new rule to the SubscriptionDescription using the specified rule description.

public void AddRule (Microsoft.ServiceBus.Messaging.RuleDescription description);
Parameters
description
RuleDescription

The rule description that provides metadata of the rule to add.

Exceptions

Thrown if description is null.

Thrown if description.Name.Name is null, white space empty or not in the right format.

Thrown if description.Name.Name length has exceeded the limit of 50 characters.

Thrown if the operation exceeded the timeout value set by OperationTimeout.

Thrown if the client entity has been closed or aborted.

Thrown when an attempt is made to add another rule with same name as one that has already been added.

AddRule(String, Filter)

Adds a rule to the current subscription with the specified name and filter expression.

public void AddRule (string ruleName, Microsoft.ServiceBus.Messaging.Filter filter);
Parameters
ruleName
String

The name of the rule to add.

filter
Filter

The filter expression against which messages will be matched.

Exceptions

Thrown if filter is null.

Thrown if ruleName is null, white space empty or not in the right format.

Thrown if ruleName length has exceeded the limit of 50 characters.

Thrown if the operation exceeded the timeout value set via OperationTimeout.

Thrown if the client entity has been closed or aborted.

Thrown when an attempt is made to add another rule with same name as one that has already been added.

Applies to