Esempio n. 1
0
 /// <summary>
 /// The New Cross Connection operation provisions a cross connection
 /// for the given azure circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Service key of the dedicated circuit.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static CrossConnectionGetResponse New(this ICrossConnectionOperations operations, string serviceKey)
 {
     try
     {
         return(operations.NewAsync(serviceKey).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// The New Cross Connection operation provisions a cross connection
 /// for the given azure circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Service key of the dedicated circuit.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static Task <CrossConnectionGetResponse> NewAsync(this ICrossConnectionOperations operations, string serviceKey)
 {
     return(operations.NewAsync(serviceKey, CancellationToken.None));
 }