/// <summary>
 /// Preview Only. The Get Reserved IP operation retrieves the details
 /// for virtual IP reserved for the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.VirtualNetworks.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// The name of the reserved IP to retrieve.
 /// </param>
 /// <returns>
 /// Preview Only. A reserved IP associated with your subscription.
 /// </returns>
 public static NetworkReservedIPGetResponse Get(this IReservedIPOperations operations, string ipName)
 {
     try
     {
         return(operations.GetAsync(ipName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #2
0
 /// <summary>
 /// Preview Only. The Get Reserved IP operation retrieves the details
 /// for the virtual IP reserved for 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 to retrieve.
 /// </param>
 /// <returns>
 /// Preview Only. A reserved IP associated with your subscription.
 /// </returns>
 public static Task <NetworkReservedIPGetResponse> GetAsync(this IReservedIPOperations operations, string ipName)
 {
     return(operations.GetAsync(ipName, CancellationToken.None));
 }