SubscriptionClient.AddRule Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
member this.AddRule : Microsoft.ServiceBus.Messaging.RuleDescription -> unit
Public Sub AddRule (description As RuleDescription)
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.
Applies to
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);
member this.AddRule : string * Microsoft.ServiceBus.Messaging.Filter -> unit
Public Sub AddRule (ruleName As String, filter As 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
Azure SDK for .NET