SALES: 1-800-867-1380

SubscriptionClient::AddRule Method (RuleDescription)

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

Namespace:  Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public:
void AddRule(
	RuleDescription^ description
)

Parameters

description
Type: Microsoft.ServiceBus.Messaging::RuleDescription
The rule description that provides metadata of the rule to add.

ExceptionCondition
ArgumentNullException

Thrown if description is null.

ArgumentException

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

ArgumentOutOfRangeException

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

TimeoutException

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

OperationCanceledException

Thrown if the client entity has been closed or aborted.

MessagingEntityAlreadyExistsException

Thrown if the rule with the same name as description.Name already existed for this subscription.

MessagingEntityAlreadyExistsException

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft