SALES: 1-800-867-1380

SubscriptionClient.BeginAddRule Method (String, Filter, AsyncCallback, Object)

 

Begins an asynchronous operation to add a new rule to the subscription.

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

public IAsyncResult BeginAddRule(
	string ruleName,
	Filter filter,
	AsyncCallback callback,
	object state
)

Parameters

ruleName
Type: System.String

The name of the rule to add.

filter
Type: Microsoft.ServiceBus.Messaging.Filter

The filter expression against which messages will be matched.

callback
Type: System.AsyncCallback

An AsyncCallback delegate that references the method to invoke when the operation is complete.

state
Type: System.Object

A user-defined object that contains state information about the asynchronous operation.

Return Value

Type: System.IAsyncResult

An IAsyncResult that references the asynchronous operation to add a new rule to the subscription.

Exception Condition
ArgumentNullException

Thrown if filter is null.

ArgumentException

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

ArgumentOutOfRangeException

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

TimeoutException

Thrown if the operation exceeded the timeout value set via T:Microsoft.ServiceBus.Messaging.MessagingFactorySettings.OperationTimeout.

OperationCanceledException

Thrown if the client entity has been closed or aborted.

MessagingEntityAlreadyExistsException

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

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft