Method ListNamespacesAsync
ListNamespacesAsync(AdminOptions, CancellationToken)
On-premise only. Returns the namespaces in the store as a list of
strings.
Declaration
public Task<IReadOnlyList<string>> ListNamespacesAsync(AdminOptions options = null, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AdminOptions | options | (Optional) Options for admin DDL operation.
If not specified or null, appropriate defaults
will be used. See AdminOptions. |
| CancellationToken | cancellationToken | (Optional) Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyList<String>> | Task returning a list of namespaces as strings. |
Remarks
If no namespaces are found, empty list is returned. This operation
involves performing admin DDL SHOW NAMESPACES command.
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If options
contains invalid values. |
| TimeoutException | Operation has timed out. |
| InvalidOperationException | The system is not in a valid state to perform this operation. |
| BadProtocolException | If received invalid output from the SHOW NAMESPACES command. |
| NoSQLException | NoSQLException or one of its subclasses is thrown if operation cannot be performed for any other reason. See documentation for corresponding subclass of NoSQLException. |