コード例 #1
0
 /// <summary>
 /// The Delete Affinity Group operation deletes an affinity group in
 /// the specified subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715314.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>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Delete(this IAffinityGroupOperations operations, string affinityGroupName)
 {
     try
     {
         return(operations.DeleteAsync(affinityGroupName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// The Delete Affinity Group operation deletes an affinity group in
 /// the specified subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715314.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>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> DeleteAsync(this IAffinityGroupOperations operations, string affinityGroupName)
 {
     return(operations.DeleteAsync(affinityGroupName, CancellationToken.None));
 }