Udostępnij za pośrednictwem


ManagementClient.GetTopicsAsync(Int32, Int32, CancellationToken) Method

Definition

Retrieves the list of topics present in the namespace.

public virtual System.Threading.Tasks.Task<System.Collections.Generic.IList<Microsoft.Azure.ServiceBus.Management.TopicDescription>> GetTopicsAsync (int count = 100, int skip = 0, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTopicsAsync : int * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<Microsoft.Azure.ServiceBus.Management.TopicDescription>>
override this.GetTopicsAsync : int * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<Microsoft.Azure.ServiceBus.Management.TopicDescription>>
Public Overridable Function GetTopicsAsync (Optional count As Integer = 100, Optional skip As Integer = 0, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of TopicDescription))

Parameters

count
Int32

The number of topics to fetch. Defaults to 100. Maximum value allowed is 100.

skip
Int32

The number of topics to skip. Defaults to 0. Cannot be negative.

cancellationToken
CancellationToken

Returns

IList<T> containing list of topics.

Exceptions

If the parameters are out of range.

The operation times out. The timeout period is initialized through the ServiceBusConnection class. You may need to increase the value of timeout to avoid this exception if the timeout value is relatively low.

No sufficient permission to perform this operation. You should check to ensure that your ManagementClient has the correct TokenProvider credentials to perform this operation.

The server is busy. You should wait before you retry the operation.

An internal error or an unexpected exception occured.

Remarks

You can simulate pages of list of entities by manipulating count and skip. skip(0)+count(100) gives first 100 entities. skip(100)+count(100) gives the next 100 entities.

Applies to