Example #1
0
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The service key representing the relationship between Azure and the
 /// customer.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Bgp Peering operation.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static CrossConnectionGetResponse Update(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     try
     {
         return(operations.UpdateAsync(serviceKey, parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #2
0
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The service key representing the relationship between Azure and the
 /// customer.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Bgp Peering operation.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static Task <CrossConnectionGetResponse> UpdateAsync(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     return(operations.UpdateAsync(serviceKey, parameters, CancellationToken.None));
 }