示例#1
0
 /// <summary>
 /// The New Cross Connection operation provisions a cross connection
 /// for as dedicated 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>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static ExpressRouteOperationResponse BeginNew(this ICrossConnectionOperations operations, string serviceKey)
 {
     try
     {
         return(operations.BeginNewAsync(serviceKey).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
示例#2
0
 /// <summary>
 /// The New Cross Connection operation provisions a cross connection
 /// for as dedicated 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>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static Task <ExpressRouteOperationResponse> BeginNewAsync(this ICrossConnectionOperations operations, string serviceKey)
 {
     return(operations.BeginNewAsync(serviceKey, CancellationToken.None));
 }