NamespaceManager.GetRules Method
Definition
Overloads
GetRules(String, String, String) |
Retrieves an enumerable collection of all rules in the service namespace with specified topic path, subscription name and filter. |
GetRules(String, String) |
Retrieves an enumerable collection of all rules in the service namespace. |
GetRules(String, String, String)
Retrieves an enumerable collection of all rules in the service namespace with specified topic path, subscription name and filter.
public System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.RuleDescription> GetRules (string topicPath, string subscriptionName, string filter);
member this.GetRules : string * string * string -> seq<Microsoft.ServiceBus.Messaging.RuleDescription>
Public Function GetRules (topicPath As String, subscriptionName As String, filter As String) As IEnumerable(Of RuleDescription)
Parameters
- topicPath
- String
The topic path relative to the service namespace base address.
- subscriptionName
- String
The name of the subscription.
- filter
- String
The string used to filter the rules to be retrieved.
Returns
An IEnumerable<T> object that represents the collection of all rules in the service namespace or returns an empty collection if no rule exists.
Examples
var fiveMinutesAgo = DateTime.UtcNow.AddMinutes(-5).ToString("M/dd/yyyy hh:mm:ss");
var rulesInTheLast5Minutes = namespaceManager.GetRules(topicName, subscriptionName, $"createdAt gt '{fiveMinutesAgo}'");
Remarks
Filter expression format: {Propery} {Logical Operator} {Value} {Filter expression}
Available properties: ModifiedAt | AccessedAt | CreatedAt
Logical operators: Eq | Ne | Gt | Ge | Lt | Le
Value: A value of the corresponding property type
GetRules(String, String)
Retrieves an enumerable collection of all rules in the service namespace.
public System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.RuleDescription> GetRules (string topicPath, string subscriptionName);
member this.GetRules : string * string -> seq<Microsoft.ServiceBus.Messaging.RuleDescription>
Public Function GetRules (topicPath As String, subscriptionName As String) As IEnumerable(Of RuleDescription)
Parameters
- topicPath
- String
The path of the topic relative to the service namespace base address.
- subscriptionName
- String
The name of the subscription.
Returns
An IEnumerable<T> object that represents the collection of all rules in the service namespace or returns an empty collection if no rule exists.