コード例 #1
0
 /// <summary>
 /// Deletes an existing namespace. This operation also removes all
 /// associated entities including queues, topics, relay points, and
 /// messages stored under the namespace.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj856296.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.INamespaceOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Delete(this INamespaceOperations operations, string namespaceName)
 {
     try
     {
         return(operations.DeleteAsync(namespaceName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Deletes an existing namespace. This operation also removes all
 /// associated entities including queues, topics, relay points, and
 /// messages stored under the namespace.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj856296.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.INamespaceOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> DeleteAsync(this INamespaceOperations operations, string namespaceName)
 {
     return(operations.DeleteAsync(namespaceName, CancellationToken.None));
 }
 /// <summary>
 /// Delete existing Namespace
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.NotificationHubs.INamespaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The name of the namespace.
 /// </param>
 /// <returns>
 /// The response of the CreateOrUpdate Api Management service long
 /// running operation.
 /// </returns>
 public static Task <NamespaceLongRunningResponse> DeleteAsync(this INamespaceOperations operations, string resourceGroupName, string namespaceName)
 {
     return(operations.DeleteAsync(resourceGroupName, namespaceName, CancellationToken.None));
 }