Ejemplo n.º 1
0
 public AzureCrossConnection SetAzureCrossConnection(string serviceKey,
                                                     CrossConnectionUpdateParameters parameters)
 {
     return (Client.CrossConnections.Update(serviceKey, parameters)).CrossConnection;
 }
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. The service key representing the relationship between
 /// Azure and the customer.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update Bgp Peering operation.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static Task<CrossConnectionGetResponse> UpdateAsync(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     return operations.UpdateAsync(serviceKey, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. The service key representing the relationship between
 /// Azure and the customer.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update CrossConnection
 /// operation.
 /// </param>
 /// <returns>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static Task<ExpressRouteOperationResponse> BeginUpdateAsync(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     return operations.BeginUpdateAsync(serviceKey, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. The service key representing the relationship between
 /// Azure and the customer.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update Bgp Peering operation.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static CrossConnectionGetResponse Update(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((ICrossConnectionOperations)s).UpdateAsync(serviceKey, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The service key representing the relationship between Azure and the
 /// customer.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Bgp Peering operation.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static CrossConnectionGetResponse Update(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     try
     {
         return operations.UpdateAsync(serviceKey, parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }