NamespaceManager.GetRules メソッド

定義

オーバーロード

GetRules(String, String, String)

指定したトピック パス、サブスクリプション名、フィルターを使用して、サービス名前空間内のすべてのルールの列挙可能なコレクションを取得します。

GetRules(String, String)

サービス名前空間内のすべてのルールの列挙可能なコレクションを取得します。

GetRules(String, String, String)

指定したトピック パス、サブスクリプション名、フィルターを使用して、サービス名前空間内のすべてのルールの列挙可能なコレクションを取得します。

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)

パラメーター

topicPath
String

サービス名前空間のベース アドレスに対する相対トピック パス。

subscriptionName
String

サブスクリプションの名前です。

filter
String

取得するルールをフィルター処理するために使用される文字列。

戻り値

IEnumerable<T>サービス名前空間内のすべてのルールのコレクションを表すオブジェクト。ルールが存在しない場合は空のコレクションを返します。

var fiveMinutesAgo = DateTime.UtcNow.AddMinutes(-5).ToString("M/dd/yyyy hh:mm:ss");
var rulesInTheLast5Minutes = namespaceManager.GetRules(topicName, subscriptionName, $"createdAt gt '{fiveMinutesAgo}'");

注釈

フィルター式の形式: {Propery} {Logical Operator} {Value} {Filter expression} ----------------------------------------------------------------------------------------- Available properties: ModifiedAt |AccessedAt |CreatedAt 論理演算子: Eq |Ne |Gt |Ge |Lt |Le Value: 対応するプロパティ型の値

適用対象

GetRules(String, String)

サービス名前空間内のすべてのルールの列挙可能なコレクションを取得します。

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)

パラメーター

topicPath
String

サービス名前空間のベース アドレスに対するトピックの相対パス。

subscriptionName
String

サブスクリプションの名前です。

戻り値

IEnumerable<T>サービス名前空間内のすべてのルールのコレクションを表すオブジェクト。ルールが存在しない場合は空のコレクションを返します。

適用対象