/// <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>
 /// The Get Dedicated Circuit Link operation response.
 /// </returns>
 public static DedicatedCircuitLinkGetResponse New(this IDedicatedCircuitLinkOperations operations, string serviceKey, string vnetName)
 {
     try
     {
         return(operations.NewAsync(serviceKey, vnetName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 2
0
 /// <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>
 /// The Get Dedicated Circuit Link operation response.
 /// </returns>
 public static Task <DedicatedCircuitLinkGetResponse> NewAsync(this IDedicatedCircuitLinkOperations operations, string serviceKey, string vnetName)
 {
     return(operations.NewAsync(serviceKey, vnetName, CancellationToken.None));
 }