/// <summary>
 /// The Remove Dedicated Circuit Link operation deletes an existing
 /// dedicated circuit link.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitLinkOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Service key representing the dedicated circuit.
 /// </param>
 /// <returns>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static ExpressRouteOperationResponse BeginRemove(this IDedicatedCircuitLinkOperations operations, string serviceKey, string vnetName)
 {
     try
     {
         return(operations.BeginRemoveAsync(serviceKey, vnetName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// The Remove Dedicated Circuit Link operation deletes an existing
 /// dedicated circuit link.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitLinkOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. Service key representing the dedicated circuit.
 /// </param>
 /// <param name='vnetName'>
 /// Required.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <ExpressRouteOperationResponse> BeginRemoveAsync(this IDedicatedCircuitLinkOperations operations, string serviceKey, string vnetName)
 {
     return(operations.BeginRemoveAsync(serviceKey, vnetName, CancellationToken.None));
 }