Megosztás a következőn keresztül:


NamespaceManager.GetRulesAsync Method

Definition

Overloads

GetRulesAsync(String, String)

Asynchronously retrieves an enumerable collection of all rules in the service namespace.

GetRulesAsync(String, String, String)

Asynchronously retrieves an enumerable collection of all rules in the service namespace with specified topic path, subscription name and filter.

GetRulesAsync(String, String)

Asynchronously retrieves an enumerable collection of all rules in the service namespace.

public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.RuleDescription>> GetRulesAsync (string topicPath, string subscriptionName);
member this.GetRulesAsync : string * string -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.RuleDescription>>
Public Function GetRulesAsync (topicPath As String, subscriptionName As String) As Task(Of IEnumerable(Of RuleDescription))

Parameters

topicPath
String

The topic path relative to the service namespace base address.

subscriptionName
String

The name of the subscription.

Returns

The asynchronous operation.

Applies to

GetRulesAsync(String, String, String)

Asynchronously retrieves an enumerable collection of all rules in the service namespace with specified topic path, subscription name and filter.

public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.RuleDescription>> GetRulesAsync (string topicPath, string subscriptionName, string filter);
member this.GetRulesAsync : string * string * string -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.RuleDescription>>
Public Function GetRulesAsync (topicPath As String, subscriptionName As String, filter As String) As Task(Of 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

The asynchronous operation.

Examples

var fiveMinutesAgo = DateTime.UtcNow.AddMinutes(-5).ToString("M/dd/yyyy hh:mm:ss");
var rulesInTheLast5Minutes = await namespaceManager.GetRulesAsync(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

Applies to