예제 #1
0
 /// <summary>
 /// The Get Dedicated Circuit operation retrieves the specified
 /// dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The service key representing the circuit.
 /// </param>
 /// <returns>
 /// The Get Dedicated Circuit operation response.
 /// </returns>
 public static DedicatedCircuitGetResponse Get(this IDedicatedCircuitOperations operations, string serviceKey)
 {
     try
     {
         return(operations.GetAsync(serviceKey).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Get Dedicated Circuit operation retrieves the specified
 /// dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. The service key representing the circuit.
 /// </param>
 /// <returns>
 /// The Get Dedicated Circuit operation response.
 /// </returns>
 public static Task <DedicatedCircuitGetResponse> GetAsync(this IDedicatedCircuitOperations operations, string serviceKey)
 {
     return(operations.GetAsync(serviceKey, CancellationToken.None));
 }