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
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기