NamespaceManager.GetRulesAsync 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
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應