Example #1
0
 /// <summary>
 /// The Update Affinity Group operation updates the label and/or the
 /// description for an affinity group for the specified subscription.
 /// (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715316.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations.
 /// </param>
 /// <param name='affinityGroupName'>
 /// The name of your affinity group.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Affinity Group operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Update(this IAffinityGroupOperations operations, string affinityGroupName, AffinityGroupUpdateParameters parameters)
 {
     try
     {
         return(operations.UpdateAsync(affinityGroupName, parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #2
0
 /// <summary>
 /// The Update Affinity Group operation updates the label and/or the
 /// description for an affinity group for the specified subscription.
 /// (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715316.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations.
 /// </param>
 /// <param name='affinityGroupName'>
 /// The name of your affinity group.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Affinity Group operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> UpdateAsync(this IAffinityGroupOperations operations, string affinityGroupName, AffinityGroupUpdateParameters parameters)
 {
     return(operations.UpdateAsync(affinityGroupName, parameters, CancellationToken.None));
 }