NamespaceManager.GetTopics メソッド

定義

オーバーロード

GetTopics()

サービス名前空間内のトピックのコレクションを取得します。

GetTopics(String)

指定したフィルターを使用して、サービス名前空間内のトピックのコレクションを取得します。 エンティティ名 (開始値を含む)、エンティティの長さ (Gt または Lt)、作成、更新、アクセス時間 (Gt または Lt を含む) の組み合わせでフィルター処理できます。

GetTopics()

サービス名前空間内のトピックのコレクションを取得します。

public System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.TopicDescription> GetTopics ();
member this.GetTopics : unit -> seq<Microsoft.ServiceBus.Messaging.TopicDescription>
Public Function GetTopics () As IEnumerable(Of TopicDescription)

戻り値

IEnumerable<T>現在の名前空間にあるトピックのコレクションを表すオブジェクト。トピックが存在しない場合は空のコレクションを返します。

例外

操作がタイムアウトします。タイムアウト期間は、 クラスを NamespaceManagerSettings 介して初期化されます。 タイムアウト値が比較的小さい場合は、この例外を OperationTimeout 回避するために、 プロパティの値を増やす必要がある場合があります。

オブジェクトには NamespaceManager 、この操作を実行するための十分なアクセス許可がありません。 チェックして、この操作をNamespaceManager実行するための正しいTokenProvider資格情報があることを確認する必要があります。

内部エラーまたは予期しない例外が発生します。

適用対象

GetTopics(String)

指定したフィルターを使用して、サービス名前空間内のトピックのコレクションを取得します。 エンティティ名 (開始値を含む)、エンティティの長さ (Gt または Lt)、作成、更新、アクセス時間 (Gt または Lt を含む) の組み合わせでフィルター処理できます。

public System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.TopicDescription> GetTopics (string filter);
member this.GetTopics : string -> seq<Microsoft.ServiceBus.Messaging.TopicDescription>
Public Function GetTopics (filter As String) As IEnumerable(Of TopicDescription)

パラメーター

filter
String

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

戻り値

IEnumerable<T>現在の名前空間にあるトピックのコレクションを表すオブジェクト。トピックが存在しない場合は空のコレクションを返します。

var topicsWithMessages = namespaceManager.GetTopics("messageCount Gt 0");
var topicsStartsWith = namespaceManager.GetTopics($"startswith(path, 'topic') eq true");

注釈

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

適用対象