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