/// <summary>
 /// Preview Only. The Delete Reserved IP operation removes a reserved
 /// IP from your the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.VirtualNetworks.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// The name of the reserved IP.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse BeginDeleting(this IReservedIPOperations operations, string ipName)
 {
     try
     {
         return(operations.BeginDeletingAsync(ipName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Preview Only. The Begin Deleting Reserved IP operation removes a
 /// reserved IP from your the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// Required. The name of the reserved IP.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> BeginDeletingAsync(this IReservedIPOperations operations, string ipName)
 {
     return(operations.BeginDeletingAsync(ipName, CancellationToken.None));
 }