/// <summary>
 /// The Get OS Image operation retrieves the details for an operating
 /// system image from the image repository.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157191.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineImageOperations.
 /// </param>
 /// <param name='imageName'>
 /// The name of the OS image to retrieve.
 /// </param>
 /// <returns>
 /// A virtual machine image associated with your subscription.
 /// </returns>
 public static VirtualMachineImageGetResponse Get(this IVirtualMachineImageOperations operations, string imageName)
 {
     try
     {
         return operations.GetAsync(imageName).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Get OS Image operation retrieves the details for an operating
 /// system image from the image repository.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157191.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineImageOperations.
 /// </param>
 /// <param name='imageName'>
 /// The name of the OS image to retrieve.
 /// </param>
 /// <returns>
 /// A virtual machine image associated with your subscription.
 /// </returns>
 public static Task<VirtualMachineImageGetResponse> GetAsync(this IVirtualMachineImageOperations operations, string imageName)
 {
     return operations.GetAsync(imageName, CancellationToken.None);
 }
 /// <summary>
 /// Gets a virtual machine image.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Compute.IVirtualMachineImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional.
 /// </param>
 /// <returns>
 /// The get vm image operation response.
 /// </returns>
 public static Task <VirtualMachineImageGetResponse> GetAsync(this IVirtualMachineImageOperations operations, VirtualMachineImageGetParameters parameters)
 {
     return(operations.GetAsync(parameters, CancellationToken.None));
 }