/// <summary> /// The List Affinity Groups operation lists the affinity groups /// associated with the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460797.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <returns> /// The List Affinity Groups operation response. /// </returns> public static AffinityGroupListResponse List(this IAffinityGroupOperations operations) { try { return(operations.ListAsync().Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The List Affinity Groups operation lists the affinity groups /// associated with the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460797.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <returns> /// The List Affinity Groups operation response. /// </returns> public static Task <AffinityGroupListResponse> ListAsync(this IAffinityGroupOperations operations) { return(operations.ListAsync(CancellationToken.None)); }