Table of Contents

Class RuleDescription

Namespace
Microsoft.Azure.ServiceBus
Assembly
Microsoft.Azure.ServiceBus.dll

Represents a description of a rule.

public sealed class RuleDescription
Inheritance
RuleDescription
Inherited Members

Constructors

RuleDescription()

Initializes a new instance of the RuleDescription class with default values.

public RuleDescription()

RuleDescription(Filter)

Initializes a new instance of the RuleDescription class with the specified filter expression.

public RuleDescription(Filter filter)

Parameters

filter Filter

The filter expression used to match messages.

RuleDescription(string)

Initializes a new instance of the RuleDescription class with the specified name.

public RuleDescription(string name)

Parameters

name string

RuleDescription(string, Filter)

Initializes a new instance of the RuleDescription class with the specified name and filter expression.

public RuleDescription(string name, Filter filter)

Parameters

name string
filter Filter

The filter expression used to match messages.

Fields

DefaultRuleName

Gets the name of the default rule on the subscription.

public const string DefaultRuleName = "$Default"

Field Value

string

Remarks

Whenever a new subscription is created, a default rule is always added. The default rule is a TrueFilter which will enable all messages in the topic to reach subscription.

Properties

Action

Gets or sets the action to perform if the message satisfies the filtering expression.

public RuleAction Action { get; set; }

Property Value

RuleAction

The action to perform if the message satisfies the filtering expression.

Filter

Gets or sets the filter expression used to match messages.

public Filter Filter { get; set; }

Property Value

Filter

The filter expression used to match messages.

Exceptions

ArgumentNullException

null (Nothing in Visual Basic) is assigned.

Name

Gets or sets the name of the rule.

public string Name { get; set; }

Property Value

string

Returns a string Representing the name of the rule.

Remarks

Max allowed length of rule name is 50 chars.