Exemplo n.º 1
0
 /// <summary>
 /// The Get Affinity Group Properties operation returns the system
 /// properties associated with the specified affinity group.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460789.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations.
 /// </param>
 /// <param name='affinityGroupName'>
 /// The name of the desired affinity group as returned by the name
 /// element of the List Affinity Groups operation.
 /// </param>
 /// <returns>
 /// The Get Affinity Group operation response.
 /// </returns>
 public static AffinityGroupGetResponse Get(this IAffinityGroupOperations operations, string affinityGroupName)
 {
     try
     {
         return(operations.GetAsync(affinityGroupName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// The Get Affinity Group Properties operation returns the system
 /// properties associated with the specified affinity group.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460789.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations.
 /// </param>
 /// <param name='affinityGroupName'>
 /// The name of the desired affinity group as returned by the name
 /// element of the List Affinity Groups operation.
 /// </param>
 /// <returns>
 /// The Get Affinity Group operation response.
 /// </returns>
 public static Task <AffinityGroupGetResponse> GetAsync(this IAffinityGroupOperations operations, string affinityGroupName)
 {
     return(operations.GetAsync(affinityGroupName, CancellationToken.None));
 }