/// <summary> /// The List Disks operation retrieves a list of the disks in your /// image repository. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157176.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineDiskOperations. /// </param> /// <returns> /// The List Disks operation response. /// </returns> public static VirtualMachineDiskListResponse ListDisks(this IVirtualMachineDiskOperations operations) { try { return(operations.ListDisksAsync().Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The List Disks operation retrieves a list of the disks in your /// image repository. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157176.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineDiskOperations. /// </param> /// <returns> /// The List Disks operation response. /// </returns> public static Task <VirtualMachineDiskListResponse> ListDisksAsync(this IVirtualMachineDiskOperations operations) { return(operations.ListDisksAsync(CancellationToken.None)); }