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