Example #1
0
 /// <summary>
 /// The Get Cross Connection operation retrieves the Cross Connection
 /// information for the Dedicated Circuit with the specified service
 /// key.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The servicee key representing the dedicated circuit.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static CrossConnectionGetResponse Get(this ICrossConnectionOperations operations, string serviceKey)
 {
     try
     {
         return(operations.GetAsync(serviceKey).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #2
0
 /// <summary>
 /// The Get Cross Connection operation retrieves the Cross Connection
 /// information for the Dedicated Circuit with the specified service
 /// key.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The servicee key representing the dedicated circuit.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static Task <CrossConnectionGetResponse> GetAsync(this ICrossConnectionOperations operations, string serviceKey)
 {
     return(operations.GetAsync(serviceKey, CancellationToken.None));
 }